Skip to content

Instantly share code, notes, and snippets.

@abdulhadad
Created December 17, 2019 03:27
Show Gist options
  • Save abdulhadad/4d57b00af5a0f50368481f0928a18279 to your computer and use it in GitHub Desktop.
Save abdulhadad/4d57b00af5a0f50368481f0928a18279 to your computer and use it in GitHub Desktop.
promise_async.md
```js
var asyncRequest = new Promise(function(resolve, reject) {
        return setTimeout(function(){
            resolve({body: {
                a: process.env.AUTH_URL,
                b: process.env.AUTH_HEADERSKEY,
                c: process.env.AAUTH_HEADERSVAL,
                d: obj
            }})
          }, 3000);
          reject("Errr")
    })
    return asyncRequest
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment