Skip to content

Instantly share code, notes, and snippets.

@ak--47
Created March 9, 2022 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ak--47/9a87bbe9cabe38c477a96f6ca1d1e2a2 to your computer and use it in GitHub Desktop.
Save ak--47/9a87bbe9cabe38c477a96f6ca1d1e2a2 to your computer and use it in GitHub Desktop.
fire and forget with zapier?
let endpoint = `https://dm3.mixpanel.org/refreshDungeon`
let auth = `Bearer ${inputData.token}`
let dungeon = inputData.dungeon
let opts = {
method: "POST",
body: dungeon,
headers: {
"Content-Type" : "application/json",
"Authorization" : auth
}
}
//don't wait for a value; return immediately
var callback = (err, output)=>{return {foo: `bar`}}
let done = fetch(endpoint, opts).then((err, output)=> callback).catch((err, output)=> callback);
let output = {foo: `bar`};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment