Fetch Client API Documentation - v1.1.1
    Preparing search index...

    Type Alias Body

    Body:
        | string
        | ArrayBuffer
        | ArrayBufferView
        | Blob
        | File
        | FormData
        | URLSearchParams
        | ReadableStream
        | Record<string, unknown>
        | null
        | undefined

    Supported request body types for HTTP requests

    Defines all possible data types that can be sent as request body

    const jsonBody: Body = { name: 'John', age: 25 };
    const textBody: Body = 'Hello World';
    const formBody: Body = new FormData();
    const fileBody: Body = new File(['content'], 'file.txt');