2件ヒット
[1-2件を表示]
(0.024秒)
検索結果
先頭2件
-
Net
:: HTTP . Proxy(address , port = 80) -> Class (63838.0) -
Proxy 経由で http サーバに接続するためのクラスを作成し返します。
...][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'
proxy_class = Net... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (27496.0) -
Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
...unt アカウント名を文字列で与えます。
@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") # =>...