Understanding Promises....
Summary
Understanding Promises....Content
Hi,
In my custom API i want to make multiple http calls in from one function. I wll be directly calling the http request and not using connectors.
I wanted to know how to use promise in such a case. Below is a snapshot of what i am trying to achieve
var express = require('express');
var bodyParser = require('body-parser');
var request = require("request");
var versionRoutes = require('express-routes-versioning')();
var app = express();
app.use(bodyParser.urlencoded({
extended: false
}));
app.use(bodyParser.json());
module.exports = function (service) {
service.use(function (req, res, next) {
//req.version is used to determine the version
1