You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example: say I make a PUT request to create an entity, my API will return a status code 201 with a HTTP location header filled in like: www.example.com/api/v1/entity/123. Having access to this header would make my life a bit easier, however, only the response data is returned now.
I understand this might be an edge case and for 99% of requests, simply returning the data itself is sufficient, but allowing configuration of this might be interesting.
Currently, all responses are automatically resolved to axios.response.data, however, sometimes it is useful to have the wrapping AxiosResponse:
For example: say I make a PUT request to create an entity, my API will return a status code 201 with a HTTP location header filled in like: www.example.com/api/v1/entity/123. Having access to this header would make my life a bit easier, however, only the response data is returned now.
I understand this might be an edge case and for 99% of requests, simply returning the data itself is sufficient, but allowing configuration of this might be interesting.
Something like:
The text was updated successfully, but these errors were encountered: