Method: Contentful::Management::Client#http_send

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

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

HTTP Helper Abtracts the Proxy/No-Proxy logic

Parameters:

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

Returns:

  • (HTTP::Response)


492
493
494
495
# File 'lib/contentful/management/client.rb', line 492

def http_send(type, url, params, headers, proxy)
  return proxy_send(type, url, params, headers, proxy) unless proxy[:host].nil?
  HTTP[headers].public_send(type, url, params)
end