Simple:json-routes with POST, PUT, DELETE, OPTIONS, etc?


#1

@sashko - Hey Sashko,
Quick question - do you have any links to examples of using simple:json-routes with the other HTTP methods? The simple:json-routes documentation has examples for get, but none of the other methods.

JsonRoutes.add("put", "/posts", function (req, res, next) {
 // interested in examples here
});

FYI, I’ve got a new project that requires doing a lot of writing and updates via Meteor HTTP endpoints. I have some REST examples with middleware from some of the older HTTP packages, but if there’s a repository or gist somewhere with links to more advanced examples of simple:json-routes, I’d prefer starting there.
Thanks!
Abby


#2

There are examples in the simple:rest package, mostly of POST and OPTIONS:


#3

Ah! Perfect! Thank you very much! :smiley: