66件ヒット
[1-66件を表示]
(0.098秒)
ライブラリ
- date (11)
-
webrick
/ httpresponse (55)
クラス
- Date (11)
-
WEBrick
:: HTTPResponse (55)
キーワード
- body= (11)
- chunked= (11)
-
content
_ length (11) -
content
_ length= (11)
検索結果
先頭5件
-
Date
# to _ s -> String (35102.0) -
8601 書式の文字列を返します (拡大表記 ('%Y-%m-%d') を使います)。
8601 書式の文字列を返します (拡大表記 ('%Y-%m-%d') を使います)。 -
WEBrick
:: HTTPResponse # to _ s -> String (18114.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-Length: 4
hoge... -
WEBrick
:: HTTPResponse # body=(val) (13.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-Length: 4
hoge... -
WEBrick
:: HTTPResponse # chunked=(flag) (13.0) -
真に設定するとクライアントに返す内容(エンティティボディ)を chunk に分けるようになります。
...ick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
res.chunked = true
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 09:04:28 GMT
Server:
Transfer-Encoding: chunked
4
hoge
0
#... -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (13.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...'
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 GMT
Server:
Content-Length: 2
ho... -
WEBrick
:: HTTPResponse # content _ length=(len) (13.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...'
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 GMT
Server:
Content-Length: 2
ho...