playwright-test-commons - v0.8.0
    Preparing search index...

    Interface ApiBaseOptions

    Settings for an ApiBase client.

    interface ApiBaseOptions {
        baseUrl: string;
        bodyType?: BodyType;
        debug?: boolean;
        headers?: Headers | (() => Headers);
    }
    Index
    baseUrl: string

    API root, e.g. "https://example.com/api". A trailing slash is removed.

    bodyType?: BodyType

    How post, put, patch and delete send their body. Default "json".

    debug?: boolean

    Log every request and response body to the console. Default false.

    headers?: Headers | (() => Headers)

    Headers for every request: a fixed object, or a function called per request. Use a function for auth tokens that only exist after the client is created, e.g. set by a setup project.