def exec_request(params, &block)
      uri = "#{params.delete(:host)}#{params.delete(:path)}"

      params.tap do |p|
        p[:headers] = HTTP.headers.merge(p.fetch(:headers, {}))
        if p.keys.none? { |name| [:http_proxyaddr, :http_proxyport, :http_proxyuser, :http_proxypass].include?(name) }
          p[:http_proxyaddr] = proxy_uri.host
          p[:http_proxyport] = proxy_uri.port
          p[:http_proxyuser] = proxy_uri.user
          p[:http_proxypass] = proxy_uri.password
        end
      end

      handle_response(yield(uri, params))
    end
def exec_request(params, &block)
      uri = "#{params.delete(:host)}#{params.delete(:path)}"

      params.tap do |p|
        p[:headers] = HTTP.headers.merge(p.fetch(:headers, {}))
        if p.keys.none? { |name| [:http_proxyaddr, :http_proxyport, :http_proxyuser, :http_proxypass].include?(name) }
          p[:http_proxyaddr] = proxy_uri.host
          p[:http_proxyport] = proxy_uri.port
          p[:http_proxyuser] = proxy_uri.user
          p[:http_proxypass] = proxy_uri.password
        end
      end

      handle_response(yield(uri, params))
    end
Additional params for HTTParty gem can be passed
 https://github.com/jnunemaker/httparty/blob/v0.12.0/lib/httparty.rb#L43