Closed digitalsadhu closed 7 years ago
Thinking something like:
class MyRoute extends Ash.Route {
model () {
this.headers.set('Content-Type', 'application/json')
// could also this.headers.get('Content-Type')
}
}
If headers are not explicitly set then we would do our best to work out content type from the content etc.
Thoughts @pnw?
If this.headers
is the response headers, how do I access the request headers?
Hehe yea. That occurred to me after I wrote that and I've been mulling it over ever since On Fri, 11 Nov 2016 at 08:19, Patrick notifications@github.com wrote:
If this.headers is the response headers, how do I access the request headers?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ash-framework/roadmap/issues/33#issuecomment-259896840, or mute the thread https://github.com/notifications/unsubscribe-auth/ABH2Cnf-yHEXPI99VvRT10_itbvMvTl-ks5q9BcEgaJpZM4KuekO .
How should the user be able to specify headers?