JsonApiClient v2.0.0 JsonApiClient.Middleware.DefaultRequestConfig View Source
Adds default headers and options to the request.
Link to this section Summary
Functions
Manipulates a Request and Response objects.
If the Request should be processed by the next middleware then next.(request)
has to be called
Link to this section Functions
Manipulates a Request and Response objects.
If the Request should be processed by the next middleware then next.(request)
has to be called.
Args:
request
- JsonApiClient.Request that holds http request properties.
This function returns {:ok, response}
if the request is successful, {:error, reason}
otherwise.
response
- HTTP response with the following properties:
body
- body as JSON string.status_code
- HTTP Status codeheaders
- HTTP headers (e.g.,[{"Accept", "application/json"}]
)
Callback implementation for JsonApiClient.Middleware.call/3
.