I am trying to test a backend and mimic the request being sent by the frontend using curl.
Here is the command I am using:
curl -c cookie.txt --cookie cookie.txt -H "Content-Type:application/x-www-form-urlencoded; charset=UTF-8" -H "Authorization: Basic xxxxxxxxxx" -H "X-CSRFToken: xxxxxxxxxx"-d @data.csv -X POST http://localhost:5050/something/save
I am getting the following respond:
Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'
I found a couple related questions here. But I am not actually using Html and JavaScript. I am trying to use curl.