What about using a function decorator to modify the returned response?