Skip to content

Instantly share code, notes, and snippets.

@andrei-cacio
Last active December 30, 2017 17:39
Show Gist options
  • Save andrei-cacio/dfb9aa71ed1cb59ed9e35ed12261db92 to your computer and use it in GitHub Desktop.
Save andrei-cacio/dfb9aa71ed1cb59ed9e35ed12261db92 to your computer and use it in GitHub Desktop.
Fetch with cookies sample
const someRequest = new Request('/api/v1/logout');
someRequest.credentials = 'same-origin';
fetch(someRequest)
.then(response => console.log(response));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment