るりまサーチ (Ruby 2.6.0)

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

別のキーワード

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

クラス

モジュール

検索結果

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") # =>...