384件ヒット
[1-100件を表示]
(0.078秒)
ライブラリ
-
net
/ http (336) - uri (12)
-
webrick
/ httprequest (36)
クラス
-
Net
:: HTTP (276) -
Net
:: HTTPGenericRequest (36) -
Net
:: HTTPResponse (24) -
URI
:: HTTP (12) -
WEBrick
:: HTTPRequest (36)
キーワード
-
body
_ stream (12) -
body
_ stream= (12) - get (24)
- get2 (24)
- head (12)
- head2 (24)
-
path
_ info (12) -
path
_ info= (12) - post (24)
- post2 (24)
- put (12)
- put2 (24)
-
read
_ body (24) -
request
_ get (24) -
request
_ head (24) -
request
_ post (24) -
request
_ put (24) -
request
_ uri (12) -
send
_ request (12)
検索結果
先頭5件
-
Net
:: HTTPGenericRequest # path -> String (21130.0) -
リクエストする path を文字列で返します。
...リクエストする path を文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.path # => "/index.html"
//}... -
WEBrick
:: HTTPRequest # path -> String (21102.0) -
リクエスト URI のパスを表す文字列を返します。
リクエスト URI のパスを表す文字列を返します。 -
WEBrick
:: HTTPRequest # path _ info -> String (9118.0) -
リクエスト URI のパスを文字列で返します。デフォルトは path と同じです。
...リクエスト URI のパスを文字列で返します。デフォルトは path と同じです。... -
WEBrick
:: HTTPRequest # path _ info=(value) (9102.0) -
リクエスト URI のパスをセットします。
リクエスト URI のパスをセットします。
@param value リクエスト URI のパスを指定します。 -
Net
:: HTTP # send _ request(name , path , data = nil , header = nil) -> Net :: HTTPResponse (6221.0) -
HTTP リクエストをサーバに送り、そのレスポンスを Net::HTTPResponse のインスタンスとして返します。
...与えます。
@param path リクエストのパスを文字列で与えます。
@param data リクエストのボディを文字列で与えます。
@param header リクエストのヘッダをハッシュで与えます。
//emlist[例][ruby]{
response = http.send_request('GET', '/index.html')......puts response.body
//}
@see Net::HTTP#request... -
URI
:: HTTP # request _ uri -> String (6152.0) -
自身の「path + '?' + query」を文字列で返します。 query が nil である場合は、自身の path を返します。
...の「path + '?' + query」を文字列で返します。
query が nil である場合は、自身の path を返します。
path が空である場合には、path は「'/'」であるとします。
例:
require 'uri'
u = URI.parse("http://example.com/search?q=xxx")
p u.request_uri... -
Net
:: HTTP # request _ get(path , header = nil) -> Net :: HTTPResponse (3241.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......にはこれを利用します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-t......ype']
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
:: HTTP # request _ get(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (3241.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......にはこれを利用します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-t......ype']
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
:: HTTP # request _ head(path , header = nil) -> Net :: HTTPResponse (3241.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*',......ともに呼び出されたときは、
Net::HTTP#request_get と同じ動作を
しますが、そもそもヘッダしか要求していないので
body は空です。そのためこの動作はそれほど意味はありません。
@param path ヘッダを取得するエンティティのパ......文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//emlist[例][ruby]{
response = http.request_head('/index.html')
p response['content-type']
//}
@see Net::HTTP#head...