るりまサーチ

最速Rubyリファレンスマニュアル検索!
468件ヒット [1-100件を表示] (0.025秒)

別のキーワード

  1. request new
  2. request sign
  3. request verify
  4. request to_der
  5. http request_put

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Net::HTTPGenericRequest#path -> String (21129.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 (21101.0)

リクエスト URI のパスを表す文字列を返します。

リクエスト URI のパスを表す文字列を返します。

WEBrick::HTTPRequest#path_info -> String (9117.0)

リクエスト URI のパスを文字列で返します。デフォルトは path と同じです。

...リクエスト URI のパスを文字列で返します。デフォルトは path と同じです。...

WEBrick::HTTPRequest#path_info=(value) (9101.0)

リクエスト URI のパスをセットします。

リクエスト URI のパスをセットします。

@param value リクエスト URI のパスを指定します。

Net::HTTP#send_request(name, path, data = nil, header = nil) -> Net::HTTPResponse (6220.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 (6151.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 (3240.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 (3240.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 (3240.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...
<< 1 2 3 ... > >>