TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Deletes cookies by name, or every cookie the client sent

GETDELETEhttps://api.testingapis.com/api/cookies/deleteSign in to see this endpoint's URL

Accepts GET and DELETE. Each cookie is expired with Path=/.

Parameters 1

NameTypeDescription
namesquery · stringComma-separated cookie names, at most 20. Omit to delete all cookies in the request.

Responses

200
The names that were deleted.
400
Invalid name or more than 20 names.

Example

Request
curl -X GET "https://api.testingapis.com/api/cookies/delete?names=theme" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
Set-Cookie: theme=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/

{"message": "1 cookie(s) deleted", "deleted": ["theme"]}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.