22件ヒット
[1-22件を表示]
(0.034秒)
別のキーワード
検索結果
先頭2件
-
Net
:: HTTP . Proxy(address , port = 80) -> Class (18201.0) -
Proxy 経由で http サーバに接続するためのクラスを作成し返します。
...
Proxy 経由で http サーバに接続するためのクラスを作成し返します。
このクラスは Net::HTTP を継承しているので Net::HTTP と全く
同じように使えます。指定されたプロクシを常に経由して http サーバ
に接続します。
address が n......ttp'
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::Proxy('proxy.ex......ample.com', 8080)
proxy_class.start('www.example.org') {|h|
h.get('/ja/') # proxy.example.com 経由で接続します。
}
//}
@param address プロクシのホスト名を文字列で与えます。
@param port プロクシのポート番号を与えます。... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (6157.0) -
Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
...
Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
@param account アカウント名を文字列で与えます。
@param password パスワードを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html......')
req = Net::HTTP::Get.new(uri.request_uri)
req.proxy_basic_auth("account", "password") # => ["Basic YWNjb3VudDpwYXNzd29yZA=="]
//}...