8件ヒット
[1-8件を表示]
(0.106秒)
ライブラリ
-
net
/ http (8)
キーワード
-
canonical
_ each (1) -
content
_ length (1) -
content
_ length= (1) -
content
_ range (1) -
content
_ type (1) -
content
_ type= (1) -
each
_ capitalized (1) -
set
_ content _ type (1)
検索結果
先頭5件
-
Net
:: HTTPHeader # canonical _ each {|name , value| . . . . } -> () (18307.0) -
ヘッダフィールドの正規化名とその値のペアを ブロックに渡し、呼びだします。
ヘッダフィールドの正規化名とその値のペアを
ブロックに渡し、呼びだします。
正規化名は name に対し
name.downcase.split(/-/).capitalize.join('-')
で求まる文字列です。 -
Net
:: HTTPHeader # content _ length -> Integer|nil (18307.0) -
Content-Length: ヘッダフィールドの表している値を整数で返します。
...ィールドの表している値を整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError フィールドの値が不正である場合に
発生します。
//emlist[例][ruby]{
require... -
Net
:: HTTPHeader # content _ length=(len) (18307.0) -
Content-Length: ヘッダフィールドに値を設定します。
Content-Length: ヘッダフィールドに値を設定します。
len に nil を与えると Content-Length: ヘッダフィールドを
削除します。
@param len 設定する値を整数で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = ... -
Net
:: HTTPHeader # content _ range -> Range|nil (18307.0) -
Content-Range: ヘッダフィールドの値を Range で返します。 Range の表わす長さは Net::HTTPHeader#range_length で得られます。
...Content-Range: ヘッダフィールドの値を Range で返します。
Range の表わす長さは Net::HTTPHeader#range_length で得られます。
ヘッダが設定されていない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.exa... -
Net
:: HTTPHeader # content _ type -> String|nil (18307.0) -
"text/html" のような Content-Type を表す 文字列を返します。
"text/html" のような 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_uri)
req.content_type # => nil
req.content_type = 'multipart/for... -
Net
:: HTTPHeader # content _ type=(type) (18307.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 # => ni... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (18307.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 # => ni... -
Net
:: HTTPHeader # each _ capitalized {|name , value| . . . . } -> () (9007.0) -
ヘッダフィールドの正規化名とその値のペアを ブロックに渡し、呼びだします。
ヘッダフィールドの正規化名とその値のペアを
ブロックに渡し、呼びだします。
正規化名は name に対し
name.downcase.split(/-/).capitalize.join('-')
で求まる文字列です。