From my understanding it's impossible to do via connect/express middleware, and it could be nice addition to zappa.
Say,
@get '/': ->
@render index: {foo: 'bar'}
And if request has header Accept-type: application/json, server will respond with JSON {"foo":"bar"} instead of view index rendered with {foo:"bar"}
Will it be accepted into upstream? If yes, I can do that
From my understanding it's impossible to do via connect/express middleware, and it could be nice addition to zappa. Say,
And if request has header
Accept-type: application/json
, server will respond with JSON{"foo":"bar"}
instead of viewindex
rendered with{foo:"bar"}
Will it be accepted into upstream? If yes, I can do that