Skip to content

Instantly share code, notes, and snippets.

@egorvinogradov
Created April 20, 2018 14:28
Show Gist options
  • Save egorvinogradov/a65bc50f68f7bae734397469c5371e4d to your computer and use it in GitHub Desktop.
Save egorvinogradov/a65bc50f68f7bae734397469c5371e4d to your computer and use it in GitHub Desktop.
headers = new Headers();
headers.set('Content-Type', 'application/json');
headers.set('Authorization', `JWT ${localStorage.token}`);
options = {
method: 'GET',
headers: headers,
};
res = await fetch(`/cors-proxy/api/v1/users/1/`, options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment