5件ヒット
[1-5件を表示]
(0.024秒)
クラス
キーワード
- body= (1)
-
content
_ length (1) -
content
_ length= (1) -
http
_ version (1)
検索結果
先頭5件
-
WEBrick
:: HTTPVersion # to _ s -> String (63325.0) -
自身を文字列に変換して返します。
...自身を文字列に変換して返します。
require 'webrick'
v = WEBrick::HTTPVersion.new('1.1')
p v.to_s #=> "1.1"... -
WEBrick
:: HTTPResponse # http _ version -> WEBrick :: HTTPVersion (18622.0) -
レスポンスの HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトを返します。
...スの HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトを返します。
require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )
p res.http_version.class #=> WEBrick::HTTPVersion
p res.http_version.to_s... -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (76.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...まれません。
@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。
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... -
WEBrick
:: HTTPResponse # content _ length=(len) (76.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...まれません。
@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。
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... -
WEBrick
:: HTTPResponse # body=(val) (40.0) -
クライアントに返す内容(エンティティボディ)をセットします。
...ク形式にする必要はありません。
適切にチャンク形式エンコーディングされます。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connec...