maxwell v2.2.3 Maxwell.Builder.Util
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
Link to this function
allow_methods?(list, allow_methods)
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
Link to this function
default_adapter()
Global default adapter.
Link to this function
serialize_method_to_atom(methods, default_methods)
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]