Created
November 23, 2017 16:46
-
-
Save guyguyon/8b052e55b7ead8a3810f5b1ebe51cb08 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 request = require('request-promise-native'); | |
| const namespace = require('./node-request-context').getNamespace('some-namespace'); | |
| class SomeResource { | |
| get() { | |
| console.log(namespace.get('tid')); | |
| return request('http://www.google.com').then((res) => { | |
| console.log(namespace.get('tid')); | |
| return res; | |
| }) | |
| } | |
| } | |
| module.exports = SomeResource; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment