別のキーワード
種類
- インスタンスメソッド (649)
- 特異メソッド (77)
- クラス (22)
クラス
-
Net
:: HTTP (242) -
Net
:: HTTPGenericRequest (33) -
Net
:: HTTPResponse (99)
モジュール
-
Net
:: HTTPExceptions (11) -
Net
:: HTTPHeader (341)
キーワード
- Get (11)
- HTTPRequest (11)
- Proxy (11)
- [] (11)
- []= (11)
-
add
_ field (11) -
basic
_ auth (11) - body (11)
- chunked? (11)
- code (11)
-
content
_ length (11) -
content
_ length= (11) -
content
_ range (11) -
content
_ type= (11) - delete (11)
- each (11)
-
each
_ capitalized _ name (11) -
each
_ header (11) -
each
_ key (11) -
each
_ name (11) -
each
_ value (11) - entity (11)
- fetch (33)
-
form
_ data= (11) - get2 (22)
-
get
_ fields (11) -
get
_ print (22) -
get
_ response (22) - head2 (22)
-
http
_ version (11) - key? (11)
-
local
_ host= (11) -
local
_ port= (11) -
main
_ type (11) - method (22)
- msg (11)
- path (11)
-
proxy
_ basic _ auth (11) - range (11)
-
range
_ length (11) -
read
_ body (22) - request (22)
-
request
_ get (22) -
request
_ head (22) - response (11)
-
response
_ body _ permitted? (11) -
send
_ request (11) -
set
_ content _ type (11) -
set
_ form _ data (11) -
sub
_ type (11) -
type
_ params (11) - value (11)
検索結果
先頭5件
-
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (26146.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html')
response.body
# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/', ni......l) do |str|
f.write str
end
}
//}
@see Net::HTTP#request_get... -
Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (26146.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html')
response.body
# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/', ni......l) do |str|
f.write str
end
}
//}
@see Net::HTTP#request_get... -
Net
:: HTTP . get(host , path , port = 80) -> String (26126.0) -
指定した対象に GET リクエストを送り、そのボディを 文字列として返します。
...指定した対象に GET リクエストを送り、そのボディを
文字列として返します。
対象の指定方法は URI で指定するか、
(host, path, port) で指定するかのいずれかです。
@param uri データの取得対象を URI で指定します。
@param host......接続先のホストを文字列で指定します。
@param path データの存在するパスを文字列で指定します。
@param port 接続するポートを整数で指定します。
@see Net::HTTP#get... -
Net
:: HTTP . get(uri) -> String (26126.0) -
指定した対象に GET リクエストを送り、そのボディを 文字列として返します。
...指定した対象に GET リクエストを送り、そのボディを
文字列として返します。
対象の指定方法は URI で指定するか、
(host, path, port) で指定するかのいずれかです。
@param uri データの取得対象を URI で指定します。
@param host......接続先のホストを文字列で指定します。
@param path データの存在するパスを文字列で指定します。
@param port 接続するポートを整数で指定します。
@see Net::HTTP#get... -
Net
:: HTTP . get _ print(host , path , port = 80) -> () (14134.0) -
指定した対象から HTTP でエンティティボディを取得し、 $stdout に出力します。
...ートを整数で指定します。
@see Net::HTTP.get
=== 例
//emlist[][ruby]{
require 'net/http'
require 'uri'
Net::HTTP.get_print URI.parse('http://www.example.com/index.html')
//}
もしくは
//emlist[][ruby]{
require 'net/http'
Net::HTTP.get_print 'www.example.com', '/index.html'
//}... -
Net
:: HTTP . get _ print(uri) -> () (14134.0) -
指定した対象から HTTP でエンティティボディを取得し、 $stdout に出力します。
...ートを整数で指定します。
@see Net::HTTP.get
=== 例
//emlist[][ruby]{
require 'net/http'
require 'uri'
Net::HTTP.get_print URI.parse('http://www.example.com/index.html')
//}
もしくは
//emlist[][ruby]{
require 'net/http'
Net::HTTP.get_print 'www.example.com', '/index.html'
//}... -
Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse (14130.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...nse = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れ......なので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # get2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (14130.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...nse = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れ......なので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # request _ get(path , header = nil) -> Net :: HTTPResponse (14130.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...nse = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れ......なので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # request _ get(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (14130.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...nse = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れ......なので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body...