Skip to main content

drain_request_stream

Function drain_request_stream 

Source
pub async fn drain_request_stream(
    stream: RequestBodyStream,
) -> Result<Bytes, AwsServiceError>
Expand description

Drain a streaming request body into a single Bytes buffer with no upper bound. Used by handlers that legitimately need the whole payload in memory (small JSON-shaped requests that happened to land on a streaming route, e.g. ECR mount PUT with no body). Heavy uploads (S3 PutObject / UploadPart, ECR blob PATCH/PUT) take the streaming spool path via spool_request_stream instead. The dispatch-level cap (FAKECLOUD_MAX_REQUEST_BODY_BYTES) does not apply to streaming routes; this helper exists so a service handler that knows the payload is small can buffer without dragging in axum itself.