Methods
Public Instance
Public Instance methods
fetch_response(request, selector, options)
[show source]
# File lib/httpx/plugins/proxy/http.rb 26 def fetch_response(request, selector, options) 27 response = super 28 29 if response && 30 response.is_a?(Response) && 31 response.status == 407 && 32 !request.headers.key?("proxy-authorization") && 33 response.headers.key?("proxy-authenticate") && options.proxy.can_authenticate?(response.headers["proxy-authenticate"]) 34 request.transition(:idle) 35 request.headers["proxy-authorization"] = 36 options.proxy.authenticate(request, response.headers["proxy-authenticate"]) 37 send_request(request, selector, options) 38 return 39 end 40 41 response 42 end
with_proxy_basic_auth(opts)
[show source]
# File lib/httpx/plugins/proxy/http.rb 14 def with_proxy_basic_auth(opts) 15 with(proxy: opts.merge(scheme: "basic")) 16 end
with_proxy_digest_auth(opts)
[show source]
# File lib/httpx/plugins/proxy/http.rb 18 def with_proxy_digest_auth(opts) 19 with(proxy: opts.merge(scheme: "digest")) 20 end
with_proxy_ntlm_auth(opts)
[show source]
# File lib/httpx/plugins/proxy/http.rb 22 def with_proxy_ntlm_auth(opts) 23 with(proxy: opts.merge(scheme: "ntlm")) 24 end