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
You simply need to add the HTTP package by running this on command line in your project :
meteor add http
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With