るりまサーチ

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

クラス

検索結果

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

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

...TP.new を使う][ruby]{
require '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'
p...
...roxy_class = Net::HTTP::Proxy('proxy.example.com', 8080)
proxy_class.start('www.example.org') {|h|
h.get('/ja/') # proxy.example.com 経由で接続します。
}
//}

@param address プロクシのホスト名を文字列で与えます。
@param port プロクシのポート番号を与えます...