How easy to call external Web APIs in Meteor?

Tags: web-api meteor

Does (or will) Meteor provide a library to handle external Web API calls? E.g. to build a Meteor app that integrates with Facebook Graph API or Google Spreadsheet API.

Meteor now includes the http package. First, run meteor add http. Then you can make HTTP requests on the server in either sync or async style:

// server sync
res = Meteor.http.get(SOME_URL);

// server async
Meteor.http.get(SOME_URL, function (err, res) {

Same thing works on the client, but you have to use the async form.

By : Raynos


HTTP provides an HTTP request API on the client and server. To use these functions, add the HTTP package to your project with $ meteor add http.

This video can help you solving your question :)
By: admin