Closed tiger31 closed 5 years ago
request(/*url*/) Has then and catch blocks but it's not an actual Promise instance. It returns Request.
request(/*url*/)
then
catch
Promise
Request
Node.js log:
> const rq = require("request-promise-native") undefined > const axios = require('axios') undefined > (rq("https://google.com") instanceof Promise) false > (rq("https://google.com").then() instanceof Promise) true > (axios("https://google.com") instanceof Promise) true
Please use rq(...).promise() to get the actual Promise.
rq(...).promise()
Thanks, didn't find this one in docs
request(/*url*/)
Hasthen
andcatch
blocks but it's not an actualPromise
instance. It returnsRequest
.Node.js log: