The TrafficScript function http.getBody() will return the entire HTTP POST body (not the headers of course), or will return the empty string if there was no body provided. The entire body is buffered up in memory (you can pass an optional 'length' parameter to limit how much data is buffered).
This function logs the POST body as follows:
This capability is useful if you want to log a post body is for debugging or record keeping. However, there are many reasons why you might want to gather the post data (to inspect, transform, validate or route traffic) and the same principles apply. One good example is when processing SOAP traffic; you want to read the XML payload, check it against a DTD, perhaps transform it, and then route the traffic based on the method in the request.