るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.038秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:@[x] > クエリ:see[x] > バージョン:2.6.0[x] > ライブラリ:webrick/httpresponse[x]

別のキーワード

  1. httpstatus rc_see_other
  2. webrick/httpstatus rc_see_other
  3. rc_see_other webrick/httpstatus
  4. rc_see_other webrick::httpstatus

クラス

キーワード

検索結果

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

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

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

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

@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#content_type=(val) (64.0)

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

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

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

res.content_type = "text/html"

@see WEBrick::HTTPUtils.#mime_type