Last active
April 15, 2020 12:55
-
-
Save flybayer/ed245ba248b74864143c5b9ec21bcddb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const res = await fetch(action, { | |
method, | |
body: data, | |
headers: { | |
Accept: 'application/json', | |
}, | |
}) | |
if (res.ok && res.headers.get('Location')) { | |
console.log(res.headers.get('Location')) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment