44件ヒット
[1-44件を表示]
(0.044秒)
ライブラリ
-
webrick
/ httpresponse (44)
キーワード
-
content
_ length (11) -
content
_ length= (11) -
to
_ s (11)
検索結果
先頭4件
-
WEBrick
:: HTTPResponse # body -> String | IO (18209.0) -
クライアントに返す内容(エンティティボディ)を返します。
...クライアントに返す内容(エンティティボディ)を返します。
自身が chunked であっても body の値はチャンク形式ではありません。... -
WEBrick
:: HTTPResponse # to _ s -> String (108.0) -
実際にクライアントに送られるデータを文字列として返します。
...るデータを文字列として返します。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:49 GMT
Server:
Content-... -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (37.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...す。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が同じかどうかの検証は行われません。
: body が IO......は出来ません。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 12:04:32 GM... -
WEBrick
:: HTTPResponse # content _ length=(len) (37.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...す。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が同じかどうかの検証は行われません。
: body が IO......は出来ません。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 12:04:32 GM...