220件ヒット
[1-100件を表示]
(0.112秒)
ライブラリ
-
drb
/ extservm (11) -
net
/ http (165) - open-uri (11)
- uri (22)
-
webrick
/ httpresponse (11)
クラス
-
DRb
:: ExtServManager (11) -
Net
:: HTTPGenericRequest (88) -
Net
:: HTTPResponse (11) -
URI
:: Generic (22) -
WEBrick
:: HTTPResponse (11)
モジュール
-
Net
:: HTTPHeader (66) -
OpenURI
:: OpenRead (11)
キーワード
-
basic
_ auth (11) - body (11)
- body= (11)
-
body
_ stream (11) -
body
_ stream= (11) - chunked? (11)
- coerce (11)
-
each
_ value (11) - fetch (11)
- method (11)
- path (11)
-
proxy
_ basic _ auth (11) - read (11)
-
request
_ body _ permitted? (11) -
request
_ uri= (11) -
response
_ body _ permitted? (11) - select (11)
-
sub
_ type (11) - value (11)
検索結果
先頭5件
-
DRb
:: ExtServManager # uri=(uri) (24301.0) -
サービス起動時にプロセスを spawn する時に渡す URI を設定します。
...サービス起動時にプロセスを spawn する時に渡す URI を設定します。
@see DRb::ExtServManager#uri... -
WEBrick
:: HTTPResponse # request _ uri=(uri) (12201.0) -
リクエストの URI をセットします。 デフォルトは nil です。
...リクエストの URI をセットします。
デフォルトは nil です。
@param uri リクエストの URI を URI オブジェクトで指定します。... -
Net
:: HTTPGenericRequest # request _ body _ permitted? -> bool (9107.0) -
リクエストにエンティティボディを一緒に送ることが許されている HTTP メソッド (POST など)の場合真を返します。
...場合真を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
post.request_body_permitted? # => true
head = Net::HTTP::Head.new(uri.request_uri)
head.request_body_permitted? # => false
//}... -
Net
:: HTTPHeader # each _ value {|value| . . . . } -> () (6207.0) -
保持しているヘッダの値をブロックに渡し、呼びだします。
...れる文字列は ", " で連結したものです。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_value { |value| puts value }
# => gzip;q=1.0,deflate;q=0.6,identity;q=0.3
# => */*
# => Ruby
//}... -
Net
:: HTTPResponse # value -> nil (6113.0) -
レスポンスが 2xx(成功)でなかった場合に、対応する 例外を発生させます。
...[ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.value # => nil
//}
//emlist[例 レスポンスが 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] (6107.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 # chunked? -> bool (6107.0) -
Transfer-Encoding: ヘッダフィールドが "chunked" である 場合に真を返します。
...ng: ヘッダフィールドが "chunked" である
場合に真を返します。
Transfer-Encoding: ヘッダフィールドが存在しなかったり、
"chunked" 以外である場合には偽を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/i......ndex.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.chunked? # => false
req["Transfer-Encoding"] = "chunked"
req.chunked? # => true
//}... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (6107.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=="]
//}... -
Net
:: HTTPHeader # sub _ type -> String|nil (6107.0) -
"text/html" における "html" のようなサブタイプを表す 文字列を返します。
...タイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.sub_type # => "html"
//}... -
URI
:: Generic # coerce(oth) -> [URI , URI] (3207.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.com>]...