Bash curl Delete with cookies

50 Views Asked by At

This works:

curl "https://website.com/stuff" -c cookie.txt -b cookie.txt

I need to do the same request, but change the method to delete. From what I can tell it should be as simple as

curl -X DELETE "https://website.com/stuff" -c cookie.txt -b cookie.txt

I end up with a "Bad Credentials" response. The credentials are in the cookies, and the previous GET request wouldn't work unless the credentials are valid. Therefore I'm the syntax is wrong and it's ignoring the cookies.

I've attempted many permutations of the above. No idea what I'm doing wrong. Any help is much appreciated.

0

There are 0 best solutions below