Sha256: 6b6ed3fe9e5d311448a98f37f7074b476d36b4f88f4063de3afe5ef5c07f9dc1
Contents?: true
Size: 802 Bytes
Versions: 12
Compression:
Stored size: 802 Bytes
Contents
Define [http method] for sending a request using the `http_method` helper. ```ruby operation :fetch do http_method :get # ... end ``` As usual, you have access to current options. This can be useful to make the method dependent from either a version, or another variation of API. ```ruby operation :fetch do # ... option :version, proc(&:to_i) http_method { version > 2 ? :post : :get } # ... end ``` The definition can be reloaded at any level of scoping. Following [RFC 7231], we support only valid methods (they could be set as case-insensitive stringified object): - GET - POST - PUT - PATCH - DELETE - OPTIONS - HEAD - TRACE - CONNECT Setting http method to another value, or missing it, will cause an exception. [http method]: [RFC 7231]: https://tools.ietf.org/html/rfc7231
Version data entries
12 entries across 12 versions & 1 rubygems