Reputation: 337
In version 3 of Superagent I was able to set a variable to the superagent request, like this:
const mySuperagent = superagent
.get(getURL)
.end(function (err, res) {})
And use mySuperagent
elsewhere.
But I've updated Superagent to version 7.0.2 and now mySuperagent
is 'undefined'.
Does anyone know what has changed because I can't figure it out?
Example: https://codesandbox.io/s/goofy-pateu-7kr5gh?file=/src/api.ts
Upvotes: 0
Views: 142