koa.js

Chaning two HTTP request with Koa.js

邮差的信 提交于 2020-01-17 06:15:10
问题 I have been trying to make two chaining HTTP requests calls, second call is based on the return result of the first call. Requirement is make the first call to get the IP information and use the IP information to make the second call to grab weather data. And I am using an node module koa-http-request It only works with one request, either I can only get IP or I can only get Weather Data. var koa = require('koa'); var koaRequest = require('koa-http-request'); var app = new koa(); var lat = ''