るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

WEBrick::HTTPResponse#content_type -> String | nil (27202.0)

Content-Type ヘッダの値を返します。

...Content-Type ヘッダの値を返します。...

WEBrick::HTTPResponse#content_type=(val) (15208.0)

Content-Type ヘッダの値をセットします。

...Content-Type ヘッダの値をセットします。

@param val Content-Type ヘッダの値を文字列で指定します。

res.content_type = "text/html"

@see WEBrick::HTTPUtils.#mime_type...

WEBrick::HTTPResponse#[]=(field, val) (6007.0)

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

...@param field ヘッダ名を文字列で指定します。大文字と小文字を区別しません。

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

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

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