Class: Staccato::Adapter::NetHttpViaProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/staccato/adapter/net_http_via_proxy.rb

Instance Method Summary collapse

Constructor Details

#initialize(uri, proxy_host, proxy_port) ⇒ NetHttpViaProxy

Returns a new instance of NetHttpViaProxy.



7
8
9
10
11
# File 'lib/staccato/adapter/net_http_via_proxy.rb', line 7

def initialize(uri, proxy_host, proxy_port)
  @uri = uri
  @proxy_host = proxy_host
  @proxy_port = proxy_port
end

Instance Method Details

#post(params) ⇒ Object



13
14
15
# File 'lib/staccato/adapter/net_http_via_proxy.rb', line 13

def post(params)
  ::Net::HTTP::Proxy(@proxy_host, @proxy_port).post_form @uri, params
end