ライブラリ
-
net
/ http (231) - uri (11)
-
webrick
/ httprequest (22) -
webrick
/ httpresponse (11)
クラス
-
Net
:: HTTPGenericRequest (77) -
URI
:: HTTP (11) -
WEBrick
:: HTTPRequest (22) -
WEBrick
:: HTTPResponse (11)
モジュール
-
Net
:: HTTPHeader (154)
キーワード
- [] (11)
-
basic
_ auth (11) - body (11)
-
body
_ stream (11) -
body
_ stream= (11) -
content
_ length (11) -
content
_ range (11) -
content
_ type (11) - delete (11)
-
each
_ capitalized _ name (11) - fetch (33)
- method (22)
- path (11)
-
proxy
_ basic _ auth (11) -
query
_ string (11) - range (11)
-
range
_ length (11) -
request
_ body _ permitted? (11) -
response
_ body _ permitted? (11)
検索結果
先頭5件
-
WEBrick
:: HTTPRequest # request _ uri -> URI (30502.0) -
リクエスト URI を表す URI オブジェクトを返します。
...リクエスト URI を表す URI オブジェクトを返します。... -
WEBrick
:: HTTPResponse # request _ uri -> URI | nil (30502.0) -
リクエストの URI を返します。
...リクエストの URI を返します。... -
URI
:: HTTP # request _ uri -> String (30408.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... -
WEBrick
:: HTTPRequest # query _ string -> String (12517.0) -
リクエスト URI のクエリーを文字列で表すアクセサです。 デフォルトは request_uri.query です。
...リクエスト URI のクエリーを文字列で表すアクセサです。
デフォルトは request_uri.query です。... -
Net
:: HTTPHeader # each _ capitalized _ name {|name| . . . . } -> () (12383.0) -
保持しているヘッダ名を正規化 ('x-my-header' -> 'X-My-Header') して、ブロックに渡します。
...'x-my-header' -> 'X-My-Header')
して、ブロックに渡します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_capitalized_name { |key| puts key }
# => Accept-Encoding
# => Accept
# => User-A......gent
//}... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (12323.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
:: HTTPGenericRequest # request _ body _ permitted? -> bool (12313.0) -
リクエストにエンティティボディを一緒に送ることが許されている HTTP メソッド (POST など)の場合真を返します。
...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
:: HTTPGenericRequest # response _ body _ permitted? -> bool (12313.0) -
サーバからのレスポンスにエンティティボディを含むことが許されている HTTP メソッド (GET, POST など)の場合真を返します。
...る
HTTP メソッド (GET, POST など)の場合真を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
post.response_body_permitted? # => true
head = Net::HTTP::Head.new(uri.request_uri)
hea......d.response_body_permitted? # => false
//}... -
Net
:: HTTPHeader # basic _ auth(account , password) -> [String] (12307.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
:: HTTPGenericRequest # method -> String (9313.0) -
リクエストの HTTP メソッドを文字列で返します。
...リクエストの HTTP メソッドを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.method # => "POST"
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}...