Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

propertyiHttpRequest.Body

property Body: TStream read GetBody;
The request body, complete, or an empty stream when there was none - never nil, so it is safe to read without testing. Reading the property REWINDS to position 0, so take it into a local if you are reading in pieces:
lBody := aRequest.Body; // rewound once here The stream belongs to the request: do not free it, and do not keep it past the call. Its size is bounded by Limits.BodyBytes, so a handler cannot be handed an unbounded upload, but the bound is still whatever the operator configured - check Size before doing something expensive per octet.