def request(method, path, data = nil, options = {})
      request_options = request_options(options)

      if data
        request_options[:headers]["Content-Type"] = content_type(request_options[:headers])
        request_options[:body] = content_data(request_options[:headers], data)
      end

      HTTParty.send(method, base_url + path, request_options)
    end
def request(method, path, data = nil, options = {})
      request_options = request_options(options)

      if data
        request_options[:headers]["Content-Type"] = content_type(request_options[:headers])
        request_options[:body] = content_data(request_options[:headers], data)
      end

      HTTParty.send(method, base_url + path, request_options)
    end
Make a HTTP request.

 This method doesn't validate the response and never raise errors
 even in case of HTTP error codes, except for connection errors raised by
 the underlying HTTP client.

 Therefore, it's up to the caller to properly handle and validate the response.

 @param  [String] method The HTTP method
 @param  [String] path The path, relative to {#base_url}
 @param  [Hash] data The body for the request
 @param  [Hash] options The query and header params for the request
 @return [HTTParty::Response]