How can I properly add headers in my axios post request, post route works in postman but not when using axios
By : Jaypee
Date : March 29 2020, 07:55 AM
seems to work fine I'm trying to use JWT to protect a post route in my nodejs, express, react application. I tested it using postman by adding the JWT token to the headers and works perfectly to add the user to the database. But if I do the request from react using axios I get a 401 response (Unauthorized). , From this line I can see you are checking for a header named JWT.