taxum
    Preparing search index...

    Type Alias BodyLike

    BodyLike: Body | string | Buffer | Uint8Array | Readable | ReadableStream | null

    Represents any value that can be treated as a body payload in HTTP response handling.

    This type is a union of various formats that a body can take, enabling flexibility in providing content.

    • Body: An object that represents the body of a Response.
    • string: A text-based representation of the body content.
    • Buffer: A binary buffer containing the body data.
    • Uint8Array: A byte array containing the body data in binary form.
    • Readable: A Node.js Readable stream.
    • ReadableStream: A web-standard ReadableStream.
    • null: Represents an absent or empty body.

    String bodies will by default have a content-type of text/plain, while byte-input like Buffer or Readable will default to application/octet-stream.