るりまサーチ

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

別のキーワード

  1. net/http get
  2. http get
  3. http start
  4. net/http start
  5. net/http fetch

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 > >>

Net::HTTPHeader#fetch(key) -> String (21188.0)

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")
rescue =>...
.../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.example.com/index.html')
req = Net::HTTP...
...::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}

@see Net::HTTPHeader#[]...

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

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")
rescue =>...
.../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.example.com/index.html')
req = Net::HTTP...
...::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}

@see Net::HTTPHeader#[]...

Net::HTTPHeader#fetch(key, default) -> String (21188.0)

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")
rescue =>...
.../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.example.com/index.html')
req = Net::HTTP...
...::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}

@see Net::HTTPHeader#[]...

Gem::RemoteFetcher#request(uri, request_class, last_modified = nil) -> Net::HTTPResponse (3131.0)

与えられた URI に対してリクエストを実行し、Net::HTTPResponse を返します。

...てリクエストを実行し、Net::HTTPResponse を返します。

@param uri URI を指定します。

@param request_class Net::HTTP::Head か Net::HTTP::Get を指定します。

@param last_modified 最終更新時刻を指定します。

@see Net::HTTP, Net::HTTP::Head, Net::HTTP::Get...

Gem::RemoteFetcher#connection_for(uri) -> Net::HTTP (3118.0)

HTTP コネクションを生成して返します。

...
HTTP
コネクションを生成して返します。

既に接続している URI であれば、生成済みのコネクションを返します。
また、必要があればプロキシを使用します。

@param uri 接続先の URI を指定します。...

絞り込み条件を変える

Gem::RemoteFetcher#reset(connection) -> Net::HTTP (3102.0)

与えられたコネクションをリセットします。

与えられたコネクションをリセットします。

@param connection コネクションを指定します。

Gem::RemoteFetcher#get_proxy_from_env -> URI | nil (3053.0)

環境変数にセットされている HTTP proxy の情報を取得して返します。

...環境変数にセットされている HTTP proxy の情報を取得して返します。

ここでチェックしている環境変数は以下の通りです。

* http_proxy
* http_proxy_user
* http_proxy_pass
* HTTP_PROXY
* HTTP_PROXY_USER
* HTTP_PROXY_PASS...

Gem::RemoteFetcher#normalize_uri(uri) -> String (3017.0)

URI のスキーム部分が欠けている場合に "http://" を補って返します。

...URI のスキーム部分が欠けている場合に "http://" を補って返します。

@param uri URI 文字列を指定します。...

Gem::RemoteFetcher#open_uri_or_path(uri, last_modified = nil, head = false, depth = 0) -> StringIO | File (3007.0)

@param uri URI を指定します。

...@raise Gem::RemoteFetcher::FetchError デフォルトでは 11 回リダイレクトした場合に発生します。
depth を指定すると 10 - depth 回より多くリダイレクトした場合にこの例外が発生するようになります。
また HTTP のレスポンス...
<< 1 2 > >>