vscode-restclient
vscode-restclient copied to clipboard
Empty cookie for some requests
Is there any way to set empty cookie header for request?
Implement a new endpoint that sets a cookie with empty value and expiration with a past date
The next example uses express with cookie-parser
// In your server
async function cleanCookie(response) {
response
.cookie('cookie_name', '', { expires: new Date(0) })
.json({ message: 'success' })
}
### Sign out example
POST http://localhost:3000/clean-cookie
Usually if you're doing an auth system this must be in the 'sign out' endpoint