Explicitly pass non-json upstream response body backend_responses.<label>.body
#182
Labels
enhancement
New feature or request
backend_responses.<label>.body
#182
When I define an upstream request with a label (other than
default
), I have to define aresponse{}
, too. Because otherwise Couper wouldn't know what to pass downstream.It is straight-forward to define response status and headers. But currently I cannot simply copy the response body:
… because
backend_responses.<label>.body
doesn't exist :)We should provide the de-chunked, de-compressed bytes of the response body in that property. E.g. to allow for useless string expressions like
The string must also be binary-safe to pass arbitrary content, e.g. pass a PDF generated by an upstream service. (And a binary-string containing a null byte shouldn't truncate the value :))
At first, it's not about optimizing this kind of operation. We can buffer the download, pull the bytes it through the expression evaluation and then compress them on the way to the client.
The text was updated successfully, but these errors were encountered: