Open martijnende opened 2 years ago
I'm not a Node.js developer (because I'm using a potato laptop which is bad for programming purposes) but you can consider to try using HTTPie instead.
Thanks for the suggestion. I tried HTTPie, which gives me the same result as Axios
Since
request
is deprecated (see this issue), I am looking for an alternative to make POST requests inclient-app.js
. One good alternative isaxios
, but when trying to replicate the original code, I keep getting401
status codes.The original code using
request
is:My attempt at replicating the results with
axios
is:Based on these instructions for the public API, I don't quite understand why the
axios
POST request is not accepted. The credentials are identical as for therequest
approach, which works.