How to make a DELETE request using curl

· Thomas Taylor

For more information about curl, checkout the “What is curl” article. This article will discuss how to interact with an API using DELETE requests through curl.

Make a simple DELETE request

The basic syntax for sending a DELETE request using curl is:

1curl -X DELETE

NOTE: The -X flag is a shorthand for --request.

DELETE request example

1curl -X DELETE \

In the example above, a DELETE request is sent to the JSONPlaceholder API to delete a post with an id of 1.


Reply to this post by email ↪