maxwell v2.2.2 Maxwell.Builder.Util
Utils for builder
Summary
Functions
Make sure all list
in allow_methods
,
otherwise raise ArgumentError
Global default adapter
Serialize http method to atom lists
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
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]