stubailo / meteor-rest

:sleeping: simple:rest - make your Meteor app accessible over HTTP and DDP alike
https://atmospherejs.com/simple/rest
MIT License
382 stars 85 forks source link

Set custom Content-Type #132

Open awatson1978 opened 7 years ago

awatson1978 commented 7 years ago

Pull request to allow setting custom content-types.

JsonRoutes.setResponseHeaders({
  "Content-Type": "application/fhir+json"
});

JsonRoutes.add("post", "/fhir/Patient", function (req, res, next) {

  res.setHeader("Access-Control-Allow-Origin", "*");
  res.setHeader("Content-Type", "application/fhir+json");

  // etc etc etc
});