別のキーワード
クラス
-
Net
:: HTTP (407) -
Net
:: HTTPGenericRequest (22) -
Net
:: HTTPResponse (33)
モジュール
-
Net
:: HTTPHeader (451)
キーワード
- [] (11)
- []= (11)
-
add
_ field (11) -
basic
_ auth (11) -
canonical
_ each (11) - chunked? (11)
-
content
_ length (11) -
content
_ length= (11) -
content
_ range (11) -
content
_ type (11) -
content
_ type= (11) - copy (11)
- delete (22)
- each (11)
-
each
_ capitalized (11) -
each
_ capitalized _ name (11) -
each
_ header (11) -
each
_ key (11) -
each
_ name (11) -
each
_ value (11) - fetch (33)
-
form
_ data= (11) - get (22)
- get2 (22)
-
get
_ fields (11) - head2 (22)
- header (11)
- key? (11)
- length (11)
- lock (11)
-
main
_ type (11) - method (11)
- mkcol (11)
- move (11)
- patch (22)
- post (22)
- post2 (22)
- propfind (11)
- proppatch (11)
-
proxy
_ basic _ auth (11) - put (11)
- put2 (22)
- range (11)
- range= (22)
-
range
_ length (11) -
reader
_ header (11) - request (22)
-
request
_ body _ permitted? (11) -
request
_ get (22) -
request
_ head (22) -
request
_ post (22) -
request
_ put (22) - response (11)
-
response
_ body _ permitted? (11) -
send
_ request (11) -
set
_ content _ type (11) -
set
_ form _ data (11) -
set
_ range (33) - size (11)
-
sub
_ type (11) - trace (11)
-
type
_ params (11) - unlock (11)
検索結果
先頭5件
- Net
:: HTTP # head(path , header = nil) -> Net :: HTTPResponse - Net
:: HTTP # head2(path , header = nil) -> Net :: HTTPResponse - Net
:: HTTP # head2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # request _ head(path , header = nil) -> Net :: HTTPResponse - Net
:: HTTP # request _ head(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse
-
Net
:: HTTP # head(path , header = nil) -> Net :: HTTPResponse (21322.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse のインスタンスを返します。
...ーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse のインスタンスを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', .......@param path 取得するエンティティのパスを文字列で指定します。
@param 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 (9331.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', .......とともに呼び出されたときは、
Net::HTTP#request_get と同じ動作を
しますが、そもそもヘッダしか要求していないので
body は空です。そのためこの動作はそれほど意味はありません。
@param path ヘッダを取得するエンティティの......文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//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 (9331.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', .......とともに呼び出されたときは、
Net::HTTP#request_get と同じ動作を
しますが、そもそもヘッダしか要求していないので
body は空です。そのためこの動作はそれほど意味はありません。
@param path ヘッダを取得するエンティティの......文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//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 (9331.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', .......とともに呼び出されたときは、
Net::HTTP#request_get と同じ動作を
しますが、そもそもヘッダしか要求していないので
body は空です。そのためこの動作はそれほど意味はありません。
@param path ヘッダを取得するエンティティの......文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//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 (9331.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', .......とともに呼び出されたときは、
Net::HTTP#request_get と同じ動作を
しますが、そもそもヘッダしか要求していないので
body は空です。そのためこの動作はそれほど意味はありません。
@param path ヘッダを取得するエンティティの......文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//emlist[例][ruby]{
response = http.request_head('/index.html')
p response['content-type']
//}
@see Net::HTTP#head... -
Net
:: HTTPHeader # content _ type=(type) (9203.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...type と params から Content-Type: ヘッダフィールドの
値を設定します。
@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.......example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (9203.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...type と params から Content-Type: ヘッダフィールドの
値を設定します。
@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.......example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}... -
Net
:: HTTPHeader # content _ type -> String|nil (9103.0) -
"text/html" のような Content-Type を表す 文字列を返します。
...うな Content-Type を表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
req = Net::HTTP::Post.new(uri.request_u......ri)
req.content_type # => nil
req.content_type = 'multipart/form-data'
req.content_type # => "multipart/form-data"
//}... -
Net
:: HTTPHeader # each _ capitalized {|name , value| . . . . } -> () (9103.0) -
ヘッダフィールドの正規化名とその値のペアを ブロックに渡し、呼びだします。
...ヘッダフィールドの正規化名とその値のペアを
ブロックに渡し、呼びだします。
正規化名は name に対し
name.downcase.split(/-/).capitalize.join('-')
で求まる文字列です。... -
Net
:: HTTPHeader # each _ capitalized _ name {|name| . . . . } -> () (9103.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...