48件ヒット
[1-48件を表示]
(0.127秒)
ライブラリ
-
net
/ http (36) -
webrick
/ httpresponse (12)
クラス
モジュール
-
Net
:: HTTPHeader (36)
キーワード
- []= (12)
-
content
_ length= (12) - delete (12)
検索結果
先頭4件
-
Net
:: HTTPHeader # content _ length -> Integer|nil (21120.0) -
Content-Length: ヘッダフィールドの表している値を整数で返します。
...@raise Net::HTTPHeaderSyntaxError フィールドの値が不正である場合に
発生します。
//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 = 10
req.content_length # => 10
//}... -
Net
:: HTTPHeader # content _ length=(len) (9120.0) -
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 = 10 # => 10
req.content_length # => 10
/... -
Net
:: HTTPHeader # delete(key) -> [String] | nil (3019.0) -
key ヘッダフィールドを削除します。
...。
@param key 削除するフィールド名
@return 取り除かれたフィールドの値を返します。
key ヘッダフィールドが存在しなかった場合には
nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/i......ndex.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length = 10
req.content_length # => 10
req.delete("Content-Length") # => ["10"]
req.content_length # => nil
//}... -
WEBrick
:: HTTPResponse # []=(field , val) (107.0) -
レスポンスの該当するヘッダに val を設定します。
...val を設定します。
@param field ヘッダ名を文字列で指定します。大文字と小文字を区別しません。
@param val ヘッダの値を指定します。to_s メソッドによって文字列に変換されます。
require 'time'
res['last-modified'] = Time.now.httpda......te
@see WEBrick::HTTPResponse#chunked?, WEBrick::HTTPResponse#content_length,
WEBrick::HTTPResponse#content_type...