Module: Eson::HTTP::API

Overview

HTTP::Api is like Api, but allows to define a request method as well. All HTTP::Api objects also have to define ‘#path` as a method to return the endpoint path as a url template.

Instance Method Summary collapse

Instance Method Details

#request_method(method) ⇒ Object

DSL method to indicate the request method.

Parameters:

  • method (symbol)

    The http method verb to use.



12
13
14
15
16
# File 'lib/eson/http/api.rb', line 12

def request_method(method)
  define_method :request_method do
    @request_method || method
  end
end