るりまサーチ

最速Rubyリファレンスマニュアル検索!
132件ヒット [1-100件を表示] (0.083秒)
トップページ > クエリ:i[x] > クエリ:HTTPVersion[x] > ライブラリ:webrick/httpresponse[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. matrix i

検索結果

<< 1 2 > >>

WEBrick::HTTPResponse#http_version -> WEBrick::HTTPVersion (6331.0)

レスポンスの HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトを返します。

...ージョンを表す 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#request_http_version -> WEBrick::HTTPVersion (6303.0)

リクエストの HTTP バージョンを返します。 デフォルトでは自身の WEBrick::HTTPResponse#http_version が使われます。

...リクエストの HTTP バージョンを返します。
デフォルトでは自身の WEBrick::HTTPResponse#http_version が使われます。...

WEBrick::HTTPResponse#status_line -> String (6208.0)

HTTP のステータスラインを CR+LF 付き文字列で返します。

...HTTP のステータスラインを CR+LF 付き文字列で返します。

require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.status = 404

p res.status_line #=> "HTTP/1.1 404 Not Found \r\n"...

WEBrick::HTTPResponse#request_http_version=(ver) (6108.0)

リクエストの HTTP バージョンをセットします。

...リクエストの HTTP バージョンをセットします。

@param ver リクエストの HTTP バージョンを WEBrick::HTTPVersion オブジェクトで指定します。...

WEBrick::HTTPResponse.new(config) -> WEBrick::HTTPResponse (3114.0)

HTTPResponse オブジェクトを生成して返します。

...HTTPResponse オブジェクトを生成して返します。

@param config 設定を保存したハッシュを指定します。:HTTPVersion は必須です。

require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )...

絞り込み条件を変える

WEBrick::HTTPResponse#content_length -> Integer | nil (3108.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...を整数で表すアクセサです。デフォルトは nil です。

: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が...
...れません。
: body が IO オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バ...
...す。nil を指定することは出来ません。

require 'webrick'
i
nclude 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
Dat...

WEBrick::HTTPResponse#to_s -> String (3108.0)

実際にクライアントに送られるデータを文字列として返します。

...れるデータを文字列として返します。

require 'webrick'
i
nclude 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:
Conte...

WEBrick::HTTPResponse#body=(val) (3008.0)

クライアントに返す内容(エンティティボディ)をセットします。

... IO オブジェクトで指定します。
自身が chunked であってもチャンク形式にする必要はありません。
適切にチャンク形式エンコーディングされます。

require 'webrick'
i
nclude 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) (3008.0)

真に設定するとクライアントに返す内容(エンティティボディ)を chunk に分けるようになります。

...ick::HTTPResponse#request_http_version が 1.0 以下である場合、この値は無視されます。

@param flag true を指定した場合、レスポンスを chunk に分けてクライアントに返します。

require 'webrick'
i
nclude 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=(len) (3008.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...を整数で表すアクセサです。デフォルトは nil です。

: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が...
...れません。
: body が IO オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バ...
...す。nil を指定することは出来ません。

require 'webrick'
i
nclude 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
Dat...

絞り込み条件を変える

<< 1 2 > >>