Maxwell.Builder.Util (maxwell v2.4.0) View Source
Utils for builder
Link to this section Summary
Functions
Make sure all list
in allow_methods
,
otherwise raise ArgumentError.
Global default adapter.
Serialize http method to atom lists.
Link to this section Functions
Make sure all list
in allow_methods
,
otherwise raise ArgumentError.
Examples
iex> allow_methods?([:Get], [:post, :head, :get])
** (ArgumentError) http methods don't support Get
Global default adapter.
Serialize http method to atom lists.
methods
- http methods list, for example: ~w(get), [:get], ["get"]default_methods
- all http method lists.- raise ArgumentError when method is not atom list, string list or ~w(get put).
Examples
[:get, :head, :delete, :trace, :options, :post, :put, :patch]