るりまサーチ

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

別のキーワード

  1. webrick/httpservlet new
  2. webrick/httpservlet do_get
  3. webrick/httpservlet do_post
  4. webrick version
  5. webrick/log log

検索結果

<< 1 2 > >>

WEBrick::HTTPResponse#http_version -> WEBrick::HTTPVersion (24370.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#to_s -> String (24125.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
Ser...

WEBrick::HTTPVersion#to_s -> String (24119.0)

自身を文字列に変換して返します。

...自身を文字列に変換して返します。

require 'webrick'
v = WEBrick::HTTPVersion.new('1.1')
p v.to_s #=> "1.1"...

WEBrick::HTTPRequest#to_s -> String (24101.0)

リクエストのヘッダとボディをまとめて文字列として返します。

リクエストのヘッダとボディをまとめて文字列として返します。

WEBrick::HTTPUtils::FormData#to_s -> String (24101.0)

自身が表すフォームデータのうちのひとつを文字列として返します。

自身が表すフォームデータのうちのひとつを文字列として返します。

絞り込み条件を変える

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

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

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

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

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVe...
...rsion => "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#[]=(field, val) (6024.0)

レスポンスの該当するヘッダに val を設定します。

...せん。

@param val ヘッダの値を指定します。to_s メソッドによって文字列に変換されます。

require 'time'
res['last-modified'] = Time.now.httpdate

@see WEBrick::HTTPResponse#chunked?, WEBrick::HTTPResponse#content_length,
WEBrick
::HTTPResponse#content_type...

WEBrick::HTTPResponse#body=(val) (6024.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
Ser...

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

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは 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

#=> 出力結果
HTTP
/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oc...

WEBrick::HTTPResponse#content_length=(len) (6024.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは 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

#=> 出力結果
HTTP
/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oc...

絞り込み条件を変える

<< 1 2 > >>