るりまサーチ

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

別のキーワード

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

モジュール

キーワード

検索結果

<< < ... 20 21 22 >>

Net::HTTPHeader#sub_type -> String|nil (7.0)

"text/html" における "html" のようなサブタイプを表す 文字列を返します。

...タイプを表す
文字列を返します。

Content-Type: ヘッダフィールドが存在しない場合には nil を返します。

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

uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.sub_type # => "html"
//}...

Net::HTTPHeader#type_params -> Hash (7.0)

Content-Type のパラメータを {"charset" => "iso-2022-jp"} という形の Hash で返します。

...返します。

Content-Type: ヘッダフィールドが存在しない場合には
空のハッシュを返します。

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

uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.type_params # => {"charset"=>"UTF-8"}
//}...

WEBrick::HTTPServer#mount_proc(dir) {|req, res| ...} -> () (7.0)

サーバ上のディレクトリ dir にリクエストを処理する Proc オブジェクト proc を対応させます。

...を処理する Proc オブジェクトを指定します。
WEBrick::HTTPResponse オブジェクトと WEBrick::HTTPRequest
オブジェクトを引数として proc.call(request, response) の引数の順で呼び出されます。

@raise WEBrick::HTTPServerError proc...

WEBrick::HTTPServer#mount_proc(dir, proc) -> () (7.0)

サーバ上のディレクトリ dir にリクエストを処理する Proc オブジェクト proc を対応させます。

...を処理する Proc オブジェクトを指定します。
WEBrick::HTTPResponse オブジェクトと WEBrick::HTTPRequest
オブジェクトを引数として proc.call(request, response) の引数の順で呼び出されます。

@raise WEBrick::HTTPServerError proc...
<< < ... 20 21 22 >>