Skip to main content

payload_chunk_frame

Function payload_chunk_frame 

Source
pub fn payload_chunk_frame(chunk: &[u8]) -> Vec<u8> 
Expand description

Build a PayloadChunk event frame carrying a slice of the function’s streamed response. AWS sends one of these per logical chunk emitted by the function (e.g. each responseStream.write(...) call in a Node.js streaming handler). The body is the raw chunk bytes — AWS does not wrap them in JSON; clients reconstruct the response by concatenating the payloads of every PayloadChunk event.