Method: Contentful::Management::Client#proxy_send

Defined in:
lib/contentful/management/client.rb

#proxy_send(type, url, params, headers, proxy) ⇒ HTTP::Response

Proxy Helper

Parameters:

  • type (Symbol)
  • url (String)
  • params (Hash)
  • headers (Hash)
  • proxy (Hash)

Returns:

  • (HTTP::Response)


473
474
475
476
477
478
479
480
# File 'lib/contentful/management/client.rb', line 473

def proxy_send(type, url, params, headers, proxy)
  HTTP[headers].via(
    proxy[:host],
    proxy[:port],
    proxy[:username],
    proxy[:password]
  ).public_send(type, url, params)
end