るりまサーチ

最速Rubyリファレンスマニュアル検索!
55件ヒット [1-55件を表示] (0.145秒)

別のキーワード

  1. response new
  2. net/http response
  3. imap add_response_handler
  4. net/http get_response
  5. http get_response

ライブラリ

キーワード

検索結果

Net::HTTPResponse#http_version -> String (27226.0)

サーバがサポートしている HTTP のバージョンを文字列で返します。

...サーバがサポートしている HTTP のバージョンを文字列で返します。

//emlist[例][ruby]{
require 'net/http'

uri = "http://www.example.com/index.html"
response
= Net::HTTP.get_response(URI.parse(uri))
response
.http_version # => "1.1"
//}...

WEBrick::HTTPResponse#http_version -> WEBrick::HTTPVersion (27226.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#request_http_version -> WEBrick::HTTPVersion (15218.0)

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

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

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

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

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

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

WEBrick::HTTPResponse#chunked=(flag) (6007.0)

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

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

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

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion...
...=> "1.1" } )
res.body = 'hoge'
res.chunked = true
p
rint 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

#...

絞り込み条件を変える