Methods must finish all of their entries before returning.
In this example, the easiest way would be to simply omit the callback and use the return value of Meteor.http.get:
if Meteor.is_server Meteor.methods test: -> data = Meteor.http.get "http://www.meteor.com" Records.insert some:"data"
Behind the scenes, it uses futures such as avital. If you want to execute multiple callbacks in parallel or other complicated things, you can use futures api. However, if you just make one request or your requests should already be consistent, using the synchronous version of Meteor.http.get works and is easier to enter.
source share