0

I'm talking about server side table scripts.

I need to implement function to make synchronized http request in Azure Mobile Services - without callbacks.

Something like that:

var data1 = httpRequest(url1);
var data2 = httpRequest(url2);
var data3 = httpRequest(url3);

Is it possible?

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
user1717140
  • 343
  • 1
  • 5
  • 15

1 Answers1

0

edit:

var request = require('request')

request({ uri: 'http://api.com/1' }, function(err, response, body){
    // use body
    request({ uri: 'http://api.com/2' }, function(err, response, body){
        // use body
        request({ uri: 'http://api.com/3' }, function(err, response, body){
            // use body
        })
    })
})

more options in here: Synchronous request in Node.js

Community
  • 1
  • 1
Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90