-
-
Save xyzdata/3b01b5d4e9e5698058f3def689126bc2 to your computer and use it in GitHub Desktop.
Fetch API Post example
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 promise = new Promise( | |
(resolve, reject) => { | |
// do a thing, possibly async, then… | |
if (/* everything turned out fine */) { | |
resolve("Stuff worked!"); | |
} | |
else { | |
reject(Error("It broke")); | |
} | |
} | |
); |
xgqfrms
commented
May 9, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment