Maxwell.Middleware.DecodeJson (maxwell v2.4.0) View Source
Decode response's body to json when
- The reponse headers contain a content type of
application/json
and body is binary. - The response is a list
Default json decoder is Poison
Examples
# Client.ex
use Maxwell.Builder ~(get)a
middleware Maxwell.Middleware.DecodeJson
# OR
middleware Maxwell.Middleware.DecodeJson,
decode_content_types: ["text/javascript"],
decode_func: &other_json_lib.decode/1