module HTTParty::ClassMethods

Common Request Options

Request methods (get, post, patch, put, delete, head, options) all take a common set of options. These are:

:body:

Body of the request. If passed an object that responds to to_hash, will try to normalize it first, by default passing it to ActiveSupport::to_params. Any other kind of object will get used as-is.

:http_proxyaddr:

Address of proxy server to use.

:http_proxyport:

Port of proxy server to use.

:http_proxyuser:

User for proxy server authentication.

:http_proxypass:

Password for proxy server authentication.

:limit:

Maximum number of redirects to follow. Takes precedences over :no_follow.

:query:

Query string, or an object that responds to to_hash representing it. Normalized according to the same rules as :body. If you specify this on a POST, you must use an object which responds to to_hash. See also HTTParty::ClassMethods.default_params.

:timeout:

Timeout for opening connection and reading data.

:local_host:

Local address to bind to before connecting.

:local_port:

Local port to bind to before connecting.

:body_stream:

Allow streaming to a REST server to specify a body_stream.

:stream_body:

Allow for streaming large files without loading them into memory.

:multipart:

Force content-type to be multipart

There are also another set of options with names corresponding to various class methods. The methods in question are those that let you set a class-wide default, and the options override the defaults on a request-by-request basis. Those options are: