def fetch
      Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |https|
        req = Net::HTTP.const_get(action).new(uri)

        set_body(req)
        set_format_header(req)

        wrap_response(https.request(req))
      end
    end
def fetch
      Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |https|
        req = Net::HTTP.const_get(action).new(uri)

        set_body(req)
        set_format_header(req)

        wrap_response(https.request(req))
      end
    end
Prepares a fancy request object and ensures the inputs make as much sense
 as possible. It's still totally possible to just provide a path that
 doesn't match a real url though.

 Executes the http(s) request and provides the response with some
 additional decoration in a Hash.