Status and headers not given to then/success#6
Status and headers not given to then/success#6mathbruyen wants to merge 1 commit intoaxios:masterfrom mathbruyen:headers
Conversation
|
@mathbruyen that's what I get for not having proper tests. Thanks for catching this for me. I will see what can be done. |
|
The simplest would be resolve the promise with the whole Another one is to resolve with an array and recommend the usage of Don't know if it's a good idea but maybe having a config option which changes the resolve type, like: Backward compatibility is fine, and only users actually using headers/status will receive it. |
|
I know that HTTP an angular response with the full response object
|
|
So, while it's an inconvenience to force people to deal with another object to get the actual data, for consistency's sake I think you should resolve with the data. |
|
@mathbruyen thanks again for helping catch this bug. This has been resolved (1fa35ce) and the fix is available with version 0.3.0. |
The readme mentions that promises resolve with multiple arguments giving the status code and response headers in addition to data, but most promises library do not handle multiple arguments.
I added a spec to show it, but I think it requires an API change to work, thus I did not look at solutions yet.
Any advice there?