Methods
Methods
How to use Methods, Meteor's remote procedure call system, to write to the database.
After reading this article, you’ll know:
- What Methods are in Meteor and how they work in detail.
- Best practices for defining and calling Methods.
- How to throw and handle errors with Methods.
- How to call a Method from a form.
What is a Method?
Methods are Meteor’s remote procedure call (RPC) system, used to save user input events and data that come from the client. If you’re familiar with REST APIs or HTTP, you can think of them like POST requests to your server, but with many nice features optimized for building a modern web application. Later on in this article, we’ll go into detail about some of the benefits you get from Methods that you wouldn’t get from an HTTP endpoint.
At its core, a Method is an API endpoint for your server; you ca