Class: HTTPX::Plugins::Proxy::HTTP::ConnectRequest
- Defined in:
- lib/httpx/plugins/proxy/http.rb
Constant Summary
Constants inherited from Request
Request::METHODS, Request::USER_AGENT
Instance Attribute Summary
Attributes inherited from Request
#body, #headers, #options, #response, #state, #timer, #uri, #verb
Instance Method Summary collapse
-
#initialize(uri, options) ⇒ ConnectRequest
constructor
A new instance of ConnectRequest.
- #path ⇒ Object
Methods inherited from Request
#authority, #drain_body, #expects?, #inspect, #merge_headers, #origin, #query, #scheme, #transition
Methods included from Callbacks
Constructor Details
#initialize(uri, options) ⇒ ConnectRequest
Returns a new instance of ConnectRequest.
105 106 107 108 109 110 |
# File 'lib/httpx/plugins/proxy/http.rb', line 105 def initialize(uri, ) super(:connect, uri, {}) proxy_params = .proxy @headers["proxy-authentication"] = "Basic #{proxy_params.token_authentication}" if proxy_params.authenticated? @headers.delete("accept") end |
Instance Method Details
#path ⇒ Object
112 113 114 |
# File 'lib/httpx/plugins/proxy/http.rb', line 112 def path "#{@uri.hostname}:#{@uri.port}" end |