@Billie McQueeney Thanks for reaching out. Azure API Management (APIM) automatically decides whether to use chunked or whole transfer encoding based on the size of the payload and other factors, and you cannot explicitly configure it.
If the backend is returning chunked transfer encoding and you want to buffer the response and send it as whole transfer encoding to the client, you can use the set-body
policy in the <outbound>
section of your policy to buffer the response.
Here is an example of how you can use the set-body
policy to buffer the response:
<outbound> <base /> <set-body template="none">@{return context.Response.Body.As<string>(preserveContent: true);}</set-body> </outbound>
By using this policy, you can ensure that the response is sent as whole transfer encoding to the client, even if the backend is returning chunked transfer encoding.
do let me know incase of further queries, I would be happy to assist you.