I was wondering why there is a maximum content length for the body of an application/JSON.
I ask this because using the ARI service you have the possibility to raise an event to a user or to send a message to an endpoint and to attach some information to the body content using the variables parameter.
If the body content length is greater than 4096, then the request will fail because it tries to get the body of the HTTP request using the ast_http_get_contents method which has this limitation. This limitation doesn’t happen when you want to retrieve the information about all the endpoints from the system using a GET HTTP request to /endpoints URI, even if the content length of the response is greater than 4096.
Therefore I have the following questions:
- Was this the desired design? If this is the case I believe that it would be better to write this limitation on the ARI documentation.
- Is it safe to extent the value of MAX_CONTENT_LENGTH macro definition?
- Should I split the content of the variables parameter in smaller chunks?
- Is there another workaround for this kind of situation?