Closed JackLe1991 closed 5 years ago
Assuming you are using defaults, the command should be:
curl -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsImV4cCI6MTQ4OTk3ODY3MSwiaWF0IjoxNDg5OTc4MDcxfQ.eyJpZCI6MX0.wphF8H3o4p9r-DcynZr_6o_vxOccDaQVfcgQDOsUZrM" -d '{"username":"Test1","password":"adada"}' http://127.0.0.1:5000/api/users
This issue will be automatically closed due to being inactive for more than six months. Please reopen if you need more assistance.
How to test curl POST with token key and data ? Example: curl -H "Content-Type: application/json" -H "authToken: eyJhbGciOiJIUzI1NiIsImV4cCI6MTQ4OTk3ODY3MSwiaWF0IjoxNDg5OTc4MDcxfQ.eyJpZCI6MX0.wphF8H3o4p9r-DcynZr_6o_vxOccDaQVfcgQDOsUZrM" -d '{"username":"Test1","password":"adada"}' http://127.0.0.1:5000/api/users Result: Unauthorized Access