Closed shadowhand closed 6 years ago
This is a great idea, I’d like us to go a little more generic on it though and make the behaviour available on all strategies, maybe in an abstract.
I think we should go with setDefaultResponseHeaders
and addDefaultResponseHeader
, set should loop a key => value array and invoke add, add should add to a protected property array, overriding anything that already exists.
JsonStrategy
should have a default content type already in the array. Then once we have a response, loop through the array and add each header if the response doesn’t already have it.
Thoughts?
Replaced with #211
Fixes #201