Module: RubyProxyHeaders::HTTPGem
- Defined in:
- lib/ruby_proxy_headers/http_gem.rb
Overview
HTTP.rb (the http gem) sends proxy_headers on CONNECT and returns them
as response.proxy_headers. This wrapper adds proxy_response_headers,
matching the other adapters.
Defined Under Namespace
Classes: ProxyClient, ProxyResponse
Class Method Summary
collapse
Class Method Details
.create_client(proxy:, proxy_headers: {}, **options) ⇒ Object
27
28
29
|
# File 'lib/ruby_proxy_headers/http_gem.rb', line 27
def self.create_client(proxy:, proxy_headers: {}, **options)
ProxyClient.new(proxy: proxy, proxy_headers: , **options)
end
|
.get(url, proxy:, proxy_headers: {}, **options) ⇒ Object
31
32
33
|
# File 'lib/ruby_proxy_headers/http_gem.rb', line 31
def self.get(url, proxy:, proxy_headers: {}, **options)
create_client(proxy: proxy, proxy_headers: ).get(url, **options)
end
|
.post(url, proxy:, proxy_headers: {}, body: nil, **options) ⇒ Object
35
36
37
|
# File 'lib/ruby_proxy_headers/http_gem.rb', line 35
def self.post(url, proxy:, proxy_headers: {}, body: nil, **options)
create_client(proxy: proxy, proxy_headers: ).post(url, body: body, **options)
end
|