I am using this package in meteor, simple:json-routes. Here is the link for the package. https://atmospherejs.com/simple/json-routes
So here is my sample code in my meteor application,
JsonRoutes.add("get", "/api/:id", function (req, res, next) {
var id = req.params.id;
JsonRoutes.sendResult(res, {});
});
How can I return a response with XML? How can I also return JSON? Is it possible to return response in XML or JSON in request from other domain? How can I do it?
via JMA
No comments:
Post a Comment