cURL DELETE Request with Examples

In order to perform cURL request to delete a resource at the server side, you can make use of the -X DELETE option along with the cURL command on the console/terminal.


Example:
curl -X DELETE https://code2care.org/v2/api/user/151

As such requests require authentication, you can add header detail to the request for authentication basic/bearer token (if supported by the server) as follows,


Example: Basic Auth
curl -X DELETE -H "Authorization: Basic BASE64_ENCODED_CREDENTIALS" https://code2care.org/v2/api/user/151

Example: OAuth 2.0 Bearer Token
curl -X DELETE -H "Authorization: Bearer TOKEN" https://code2care.org/v2/api/user/151

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!