Blog

curl -X PUT /api/example/update \
-H "Accept: application/json" \
-H "Authorization: Bearer your-access-token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d '{"name":"David van der Tuijn"}'

Method Spoofing

Change the Content-Type to 'application/json' and add the key '_method' with value 'PUT'.

curl -X PUT /api/example/update \
-H "Accept: application/json" \
-H "Authorization: Bearer your-access-token" \
-H "Content-Type: application/json" \
-d '{"_method":"PUT","name":"David van der Tuijn"}'
Zoeken