Merge pull request #959 from lostisland/docs-connection-overload

document both uses of Connection#options
This commit is contained in:
risk danger olson 2019-04-01 15:41:08 -06:00 committed by GitHub
commit a8cd68e18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,14 +212,14 @@ module Faraday
RUBY
end
# @!method options(url = nil, params = nil, headers = nil)
# Makes an OPTIONS HTTP request without a body.
# @!scope class
# @overload options()
# Returns current Connection options.
#
# @param url [String] The optional String base URL to use as a prefix for
# all requests. Can also be the options Hash.
# @param params [Hash] Hash of URI query unencoded key/value pairs.
# @param headers [Hash] unencoded HTTP header key/value pairs.
# @overload options(url, params = nil, headers = nil)
# Makes an OPTIONS HTTP request to the given URL.
# @param url [String] String base URL to sue as a prefix for all requests.
# @param params [Hash] Hash of URI query unencoded key/value pairs.
# @param headers [Hash] unencoded HTTP header key/value pairs.
#
# @example
# conn.options '/items/1'