I
I
Ilya Izumskee2015-10-03 14:54:16
JavaScript
Ilya Izumskee, 2015-10-03 14:54:16

How to process jsonp callback in Meteor?

Tell me how to process jsonp callback in Meteor?
I make a request like this

let response = HTTP.call('GET', 'http://www.travelpayouts.com/whereami', {
  params: {
    locale: 'en',
    callback: 'useriata',
    ip: '46.53.201.109'
  }
});

in response.content I get
useriata({"iata":"MSQ","name":"Minsk","country_name":"Belarus"})

Tell me how to properly process this callback in Meteor?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Immortal_pony, 2015-10-03
@Immortal_pony

C Meteor Never worked, but logic suggests something like this:

callback: function(response) {
    // Do actions
},

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question