Api-proxy uses "Transfer-Encoding" to communicate with backend and in few cases it uses "Content-Length". How does Api-proxy decide whether to use Transfer-Encoding or not?
Solved! Go to Solution.
The apiproxy gets either of these headers from the client request.
So, if the client is sending the 'content-Length' header then it transmits that to the backend else if the client mentions that the request is chunked then the client passes the header 'Transfer-Encoding: chunked' which is used by the apiproxy as well to communicate to the backend.
If the request payload is being built in the apiproxy itself and its a POST to the backend and you haven't specified any of the headers,' Transfer-Encoding' or 'Content-Length', then by default, the apiproxy will use chunked encoding to send the data to the backend.
The apiproxy gets either of these headers from the client request.
So, if the client is sending the 'content-Length' header then it transmits that to the backend else if the client mentions that the request is chunked then the client passes the header 'Transfer-Encoding: chunked' which is used by the apiproxy as well to communicate to the backend.
If the request payload is being built in the apiproxy itself and its a POST to the backend and you haven't specified any of the headers,' Transfer-Encoding' or 'Content-Length', then by default, the apiproxy will use chunked encoding to send the data to the backend.