るりまサーチ

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

別のキーワード

  1. response new
  2. net/http response
  3. http get_response
  4. imap add_response_handler
  5. net/http get_response

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Net::HTTP#head(path, header = nil) -> Net::HTTPResponse (18226.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse のインスタンスを返します。

...のみを取得します。
Net::HTTPResponse のインスタンスを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...ram header リクエストの HTTP ヘッダをハッシュで指定します。

1.1 互換モードの場合は、レスポンスに応じて例外が発生します。

//emlist[例][ruby]{
require 'net/http'

response =
nil
Net::HTTP.start('some.www.server', 80) {|http|
response =
http.head('/...
...index.html')
}
p response['content-type']
//}

@see Net::HTTP#request_head...

Net::HTTP#head2(path, header = nil) -> Net::HTTPResponse (6229.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。

...ダのみを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。


head
2 は時代遅れなので使わないでください。

//emlist[例][ruby]{
response =
http.request_head('/index.html')
p response['content-type']
//}

@see Net::HTTP#head...

Net::HTTP#head2(path, header = nil) {|response| .... } -> Net::HTTPResponse (6229.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。

...ダのみを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。


head
2 は時代遅れなので使わないでください。

//emlist[例][ruby]{
response =
http.request_head('/index.html')
p response['content-type']
//}

@see Net::HTTP#head...

Net::HTTP#request_head(path, header = nil) -> Net::HTTPResponse (6229.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。

...ダのみを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。


head
2 は時代遅れなので使わないでください。

//emlist[例][ruby]{
response =
http.request_head('/index.html')
p response['content-type']
//}

@see Net::HTTP#head...

Net::HTTP#request_head(path, header = nil) {|response| .... } -> Net::HTTPResponse (6229.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。

...ダのみを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。


head
2 は時代遅れなので使わないでください。

//emlist[例][ruby]{
response =
http.request_head('/index.html')
p response['content-type']
//}

@see Net::HTTP#head...

絞り込み条件を変える

Net::HTTP#get(path, header = nil, dest = nil) -> Net::HTTPResponse (107.0)

サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。

...ティを取得し、
Net::HTTPResponse のインスタンスとして返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...「dest << ボディの断片」を実行します。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの場合...
...のボディ] となります。

//emlist[例][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('s...

Net::HTTP#get(path, header = nil, dest = nil) {|body_segment| .... } -> Net::HTTPResponse (107.0)

サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。

...ティを取得し、
Net::HTTPResponse のインスタンスとして返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...「dest << ボディの断片」を実行します。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの場合...
...のボディ] となります。

//emlist[例][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('s...

Net::HTTP#get2(path, header = nil) -> Net::HTTPResponse (107.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...ィティを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。

//emlist[例][ruby]{
# example
response =
http.request_get('/index.html')
p response['content-type']
puts response.body #...

Net::HTTP#get2(path, header = nil) {|response| .... } -> Net::HTTPResponse (107.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...ィティを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。

//emlist[例][ruby]{
# example
response =
http.request_get('/index.html')
p response['content-type']
puts response.body #...

Net::HTTP#post(path, data, header = nil, dest = nil) -> Net::HTTPResponse (107.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...ェクトは有効な body を
持ちません。

POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。

dest は時代遅れの引数...
...ずつ取得して順次
「dest << ボディの断片」を実行します。

@param path POST先のパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの場...
...す。

//emlist[例][ruby]{
# net/http version 1.1
response, body = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# version 1.2
response =
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', '...

絞り込み条件を変える

<< 1 2 > >>