143件ヒット
[1-100件を表示]
(0.158秒)
ライブラリ
-
drb
/ extservm (11) -
net
/ http (88) - open-uri (11)
- uri (22)
-
webrick
/ httpresponse (11)
クラス
-
DRb
:: ExtServManager (11) -
Net
:: HTTPGenericRequest (44) -
Net
:: HTTPResponse (11) -
URI
:: Generic (22) -
WEBrick
:: HTTPResponse (11)
モジュール
-
Net
:: HTTPHeader (33) -
OpenURI
:: OpenRead (11)
キーワード
-
basic
_ auth (11) - body (11)
- body= (11)
-
body
_ stream (11) -
body
_ stream= (11) - coerce (11)
- fetch (11)
-
proxy
_ basic _ auth (11) - read (11)
-
request
_ uri= (11) - select (11)
- value (11)
検索結果
先頭5件
-
DRb
:: ExtServManager # uri=(uri) (24307.0) -
サービス起動時にプロセスを spawn する時に渡す URI を設定します。
...サービス起動時にプロセスを spawn する時に渡す URI を設定します。
@see DRb::ExtServManager#uri... -
WEBrick
:: HTTPResponse # request _ uri=(uri) (12207.0) -
リクエストの URI をセットします。 デフォルトは nil です。
...リクエストの URI をセットします。
デフォルトは nil です。
@param uri リクエストの URI を URI オブジェクトで指定します。... -
Net
:: HTTPResponse # value -> nil (6137.0) -
レスポンスが 2xx(成功)でなかった場合に、対応する 例外を発生させます。
...を発生させます。
@raise HTTPError レスポンスが 1xx であるか、 net/http が知らない
種類のレスポンスである場合に発生します。
@raise HTTPRetriableError レスポンスが 3xx である場合に発生します。
@raise HTTPServerException......発生します。
@raise HTTPFatalError レスポンスが 5xx である場合に発生します。
//emlist[例 レスポンスが 2xx(成功)][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.value # => nil
//}
//eml......ist[例 レスポンスが 2xx以外][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.class # => Net::HTTPServerException
e.message # => 404 "Not Found"
end
//}... -
Net
:: HTTPHeader # basic _ auth(account , password) -> [String] (6119.0) -
Authorization: ヘッダを BASIC 認証用にセットします。
...Authorization: ヘッダを BASIC 認証用にセットします。
@param account アカウント名を文字列で与えます。
@param password パスワードを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net:......:HTTP::Get.new(uri.request_uri)
req.basic_auth("user", "pass") # => ["Basic dXNlcjpwYXNz"]
//}... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (6119.0) -
Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
...-Authorization: ヘッダをセットします。
@param account アカウント名を文字列で与えます。
@param password パスワードを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.......request_uri)
req.proxy_basic_auth("account", "password") # => ["Basic YWNjb3VudDpwYXNzd29yZA=="]
//}... -
URI
:: Generic # coerce(oth) -> [URI , URI] (3213.0) -
引数 oth をパースして [パース後の oth, self] の配列を返します。
...列を返します。
@param oth URI オブジェクトか文字列を指定します。
例:
require 'uri'
uri = URI.parse("http://my.example.com")
uri.coerce("http://foo.com")
# => [#<URI::HTTP:0x00000000bcb028 URL:http://foo.com/>, #<URI::HTTP:0x00000000d92178 URL:http://my.example.co... -
Net
:: HTTPGenericRequest # body=(body) (3019.0) -
サーバに送るリクエストのエンティティボディを文字列で設定します。
...す。
@param body 設定するボディを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.body = "Test Post Data" # => "Test Post Data"
//}
@see Net::HTTPGenericRequest#body... -
URI
:: Generic # select(*components) -> [String] (3019.0) -
指定された components に対応する構成要素を文字列の配列として返します。
...文字列の配列として返します。
@param components 構成要素名をシンボルで指定します。
例:
require 'uri'
uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
p uri.select(:userinfo, :host, :path)
# => ["myuser:mypass", "my.example.com", "/test.rbx"]... -
Net
:: HTTPGenericRequest # body -> String (3013.0) -
サーバに送るリクエストのエンティティボディを返します。
...クエストのエンティティボディを返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.body = "Test Post Data"
req.body # => "Test Post Data"
//}
@see Net::HTTPGenericRequest#body=... -
Net
:: HTTPGenericRequest # body _ stream -> object (3013.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
...る必要があります。
@param f エンティティボディのデータを得るストリームオブジェクトを与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/tes...