You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
By defining a Meteor method, I can return a JSON Object as such:
Meteor.method("returnJsonObject", function() {
return { "test" : "this is a test" }
});
If I send a GET request to http://localhost:3000/methods/returnJsonObject, this returns plain text just as I expect.
If I want a browser to be redirected here and automatically download this text as a file, such as "download.json", then I need to be able to update the response headers to indicate this is a file.
Is it possible to access the response headers in order to serve a file like this? I checked the unit tests and couldn't find an example...
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
By defining a Meteor method, I can return a JSON Object as such:
If I send a
GET
request tohttp://localhost:3000/methods/returnJsonObject
, this returns plain text just as I expect.If I want a browser to be redirected here and automatically download this text as a file, such as "download.json", then I need to be able to update the response headers to indicate this is a file.
Is it possible to access the response headers in order to serve a file like this? I checked the unit tests and couldn't find an example...
The text was updated successfully, but these errors were encountered: