4 ms·
I'm having trouble figuring out how this would look in code and how it would be more graceful than async/await. Can you share an example?
by davej 10y ago
I'm having trouble figuring out how this would look in code and how it would be more graceful than async/await. Can you share an example?
- jblaak 10y agoSure! Here is a gist: https://gist.github.com/JBlaak/8d9fdebb2a28a0b9026a71bced7cceaf https://gist.github.com/JBlaak/8d9fdebb2a28a0b9026a71bced7cc... Every request will have the `accept` and `X-Requested-With` headers and prefixed with some route prefix using the request and the base decorators. As you can see in consumer.js you use async/await to consume results generated by the methods.