33件ヒット
[1-33件を表示]
(0.040秒)
別のキーワード
検索結果
先頭3件
-
Net
:: HTTPExceptions # response -> Net :: HTTPResponse (21227.0) -
例外の原因となったレスポンスオブジェクトを返します。
...レスポンスオブジェクトを返します。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/invalid.html"
response = Net::HTTP.get_response(URI.parse(uri))
begin
response.value
rescue => e
e.response # => #<Net::HTTPNotFound 404 Not Found readbody=true>
end
//}... -
Net
:: HTTPResponse # http _ version -> String (9120.0) -
サーバがサポートしている HTTP のバージョンを文字列で返します。
...サーバがサポートしている HTTP のバージョンを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.http_version # => "1.1"
//}... -
Net
:: HTTP # options(path , initheader = nil) -> Net :: HTTPResponse (6202.0) -
サーバの path に OPTIONS リクエストを ヘッダが initheader として送り、 レスポンスを Net::HTTPResponse のオブジェクト で返します。
...サーバの path に OPTIONS リクエストを
ヘッダが initheader として送り、
レスポンスを Net::HTTPResponse のオブジェクト
で返します。
@param path リクエストを送るパスを文字列で与えます。
@param initheader リクエストのヘッダを「文......字列=>文字列」の
ハッシュで与えます。
@see Net::HTTP::Options...