Hi, ATS devs, As a part of https://github.com/apache/trafficserver/pull/2335, I'd like to introduce a new API that the plugin can get the entire post body.
The current signature of it is "tsapi char * TSHttpTxnGetClientRequestBody(TSHttpTxn txnp, int *len)" In the implementation, it will get a clone of the buffer reader, malloc new memory, read the content to the memory and return the address. It's not good as it requires the caller free the memory. Probably it's better to return a string, which is also kind of sketchy. The PR itself is enabling request buffering in ATS before we connecting to the origin server. Once it's done, the plugin can call this API to get the entire body. Docs will be added later in the PR. Any ideas about the API design and the PR would be much appreciated! Thanks, Zizhong