def path
      [url.path.empty? ? '/' : url.path, url.query].compact.join('?')
    end
def path
      [url.path.empty? ? '/' : url.path, url.query].compact.join('?')
    end
* <tt>verb</tt>: The verb to use in the request, either :get, :head, :patch, :put, or :post
 * <tt>url</tt>: The URL to send the request to, must be a URI instance
 * <tt>body</tt>: The body to use in the request
 * <tt>headers</tt>: A hash of headers to add to the request
 * <tt>options</tt>: A hash of additional options
   * <tt>username</tt>: Username to use for basic authentication
   * <tt>password</tt>: Password to use for basic authentication
   * <tt>tls_verify/verify_ssl</tt>: Verify the server certificate against known CA's
   * <tt>tls_ca_file</tt>: Use a specific file for CA certificates instead of the built-in one
     this only works when <tt>:tls_verify</tt> is also set.
   * <tt>tls_key_and_certificate_file</tt>: The client key and certificate file to use for this
     request
   * <tt>tls_certificate</tt>: The client certficate to use for this request
   * <tt>tls_key</tt>: The client private key to use for this request
 * <tt>configure_block</tt>: An optional block that yields the underlying <tt>Net::HTTP</tt>
   request object allowing for more fine-grained configuration

 == Examples

   request = REST::Request.new(:get, URI.parse('http://example.com/pigeons/1'))

   request = REST::Request.new(:head, URI.parse('http://example.com/pigeons/1'))

   request = REST::Request.new(:post,
     URI.parse('http://example.com/pigeons'),
     {'name' => 'Homr'}.to_json,
     {'Accept' => 'application/json, */*', 'Content-Type' => 'application/json; charset=utf-8'}
   )

   # Pass a block to configure the underlying +Net::HTTP+ request.
   request = REST::Request.new(:get, URI.parse('http://example.com/pigeons/largest')) do |http_request|
     http_request.open_timeout = 15 # seconds
   end

 == Authentication example

   request = REST::Request.new(:put,
     URI.parse('http://example.com/pigeons/1'),
     {'name' => 'Homer'}.to_json,
     {'Accept' => 'application/json, */*', 'Content-Type' => 'application/json; charset=utf-8'},
     {:username => 'Admin', :password => 'secret'}
   )

 == TLS / SSL examples

   # Use a client key and certificate
   request = REST::Request.new(:get, URI.parse('https://example.com/pigeons/1'), nil, {}, {
     :tls_key_and_certificate_file => '/home/alice/keys/example.pem'
   })

   # Use a client certificate and key from a specific location
   key_and_certificate = File.read('/home/alice/keys/example.pem')
   request = REST::Request.new(:get, URI.parse('https://example.com/pigeons/1'), nil, {}, {
     :tls_key => OpenSSL::PKey::RSA.new(key_and_certificate),
     :tls_certificate => OpenSSL::X509::Certificate.new(key_and_certificate)
   })

   # Verify the server certificate against a specific certificate
   request = REST::Request.new(:get, URI.parse('https://example.com/pigeons/1'), nil, {}, {
     :tls_verify => true,
     :tls_ca_file => '/home/alice/keys/example.pem'
   })
 Returns the path (including the query) for the request