This pull request allows headers (and other response properties) set in a handler to be present after onPostHandler -- when pagination info is returned as part of the body.
It seems that just changing the source of the original response is appropriate - all tests still pass. Is there a reason to replace the original response entirely?
Coverage remained the same at 100.0% when pulling 56e4ccf776b619bb1ed68fc0b2bc7ad89341d6ab on vsarpe:master into 80d8e86921a11956b6b3cdb779dee42d8ca213c0 on fknop:master.
This pull request allows headers (and other response properties) set in a handler to be present after
onPostHandler
-- when pagination info is returned as part of the body.Example:
return h.paginate(...).headers('My-Header', 'value');
In the current version, the header is not present in the final response because the original response is replaced by a new one:
It seems that just changing the source of the original response is appropriate - all tests still pass. Is there a reason to replace the original response entirely?