Meteor.http method is undefined on server?
http, javascript, meteor
Solution
You simply need to add the HTTP package by running this on command line in your project :
meteor add http
Problem
So, I'm trying to write a method that makes an http call. When I run the method, I get the following error: Exception while invoking method 'upload' TypeError: Cannot call method 'call' of undefined Here is what the code looks like: Client: ``` console.log(Meteor.call('upload', f, content)); ``` Server: ``` Meteor.methods({ upload: function(file, content) { this.unblock(); Meteor.http.call("PUT", "http://blah"); } }); ``` UPDATE: Problem solved, turns out I had to enable the package: `meteor add http`