0

According to SuperAgent docs: SuperAgent docs

var res = yield request
  .get('http://local')
  .auth('tobi', 'learnboost')

However, I'm finding that the var res isn't res, its req. Meaning I have only access to the request object, not the response object with the fetched data that is usually passed to the end() chainable, which is obviously what I need.

Anyone experience with this? Am I missing something?

Tremendus Apps
  • 1,497
  • 12
  • 20

1 Answers1

0

Although your question was answered on GH, figured I'd paste it here as well for others. The following worked great for me!

var res = yield Promise.resolve(request
.get('http://local')
.auth('tobi', 'learnboost'))
Benjamin Hoffman
  • 797
  • 1
  • 6
  • 18