But sometimes backends don't support chunking. In such cases you have to disable chunking. For that there are two ways.
Method 01 :
If you want to disable chunking in all APIs, you can add highlighted line to <inSequence> of velocity.xml in <APIM_HOME>/repository/resources/api_templates/
Then restart the server. Changing this file will affect future APIs created in API manager. If you want to disable chunking in old APIs as well, you have to republish old APIs.
Method 02 :
If you want to disable chunking only for certain APIs, you can use a custom mediation extension.
1. Create a sequence to disable chunking like below and save it in the file system.
2. Edit the API from API Publisher.
3. Go to "Implement" Tab and check "Enable Message Mediation".
4. Upload above created sequence to "In Flow" under "Message Mediation Policies"
5. Then save API.
Now chunking is disabled for that particular API.
If you send a "PUT" or "POST" request, you will see "Content-Length" header instead of "Transfer-Encoding: chunked" header like below in outgoing request.