1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Cleanup documentation

This commit is contained in:
Sandro Turriate 2010-01-29 16:57:27 -05:00
parent f9ea6bf5e3
commit fc73d77877
3 changed files with 7 additions and 2 deletions

View file

@ -184,18 +184,22 @@ module HTTParty
perform_request Net::HTTP::Post, path, options
end
# Perform a PUT request to a path
def put(path, options={})
perform_request Net::HTTP::Put, path, options
end
# Perform a DELETE request to a path
def delete(path, options={})
perform_request Net::HTTP::Delete, path, options
end
# Perform a HEAD request to a path
def head(path, options={})
perform_request Net::HTTP::Head, path, options
end
# Perform an OPTIONS request to a path
def options(path, options={})
perform_request Net::HTTP::Options, path, options
end

View file

@ -9,7 +9,8 @@ module HTTParty
# response object accessible via the {#response} method.
class ResponseError < StandardError
# Returns the response of the last request
# @return [Net::HTTPResponse]
# @return [Net::HTTPResponse] A subclass of Net::HTTPResponse, e.g.
# Net::HTTPOK
attr_reader :response
# Instantiate an instance of ResponseError with a Net::HTTPResponse object

View file

@ -58,7 +58,7 @@ module HTTParty
# @return [Symbol] e.g. :json
attr_reader :format
# Instantiate the parser and call #parse.
# Instantiate the parser and call {#parse}.
# @param [String] body the response body
# @param [Symbol] format the response format
# @return parsed response