るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.037秒)
トップページ > ライブラリ:net/http[x] > クラス:Net::HTTP[x] > クエリ:http[x] > クエリ:get[x] > バージョン:2.5.0[x] > クエリ:Proxy[x]

別のキーワード

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

検索結果

Net::HTTP.Proxy(address, port = 80) -> Class (63841.0)

Proxy 経由で http サーバに接続するためのクラスを作成し返します。

...ラスは Net::HTTP を継承しているので Net::HTTP と全く
同じように使えます。指定されたプロクシを常に経由して http サーバ
に接続します。

address が nil のときは Net::HTTP クラスをそのまま返します。

//emlist[例1: Net::HTTP.new を使...
...uire 'net/http'
proxy_class = Net::HTTP::Proxy('proxy.example.com', 8080)
http = proxy_class.new('www.example.org')
http.start {|h|
h.get('/ja/') # proxy.example.com 経由で接続します。
}
//}

//emlist[例2: Net::HTTP.start を使う][ruby]{
require 'net/http'
proxy_class = Net::HTTP::Prox...