るりまサーチ

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

別のキーワード

  1. rake sh
  2. fileutils sh
  3. _builtin lock_sh
  4. constants lock_sh
  5. sync sh

クラス

モジュール

キーワード

検索結果

Net::HTTP#finish -> () (6103.0)

HTTP セッションを終了します。セッション開始前にこのメソッドが 呼ばれた場合は例外 IOError を発生します。

HTTP セッションを終了します。セッション開始前にこのメソッドが
呼ばれた場合は例外 IOError を発生します。

@raise IOError セッション開始前に呼ぶと発生します。

Net::HTTPHeader#fetch(key) {|hash| .... } -> String (103.0)

key ヘッダフィールドを返します。

...key が存在する][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}

//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'

begin
req.fetch("content-length...
...efault を指定][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}

//emlist[例 key とブロックを指定][ruby]{
require 'net/http'

uri = URI.parse('http://www.exa...

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

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

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

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

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

uri = URI.parse('http://www.example.com/index.html')
res = Net:...