proactive-deps
    Preparing search index...

    Type Alias RestCheckDetails

    Defines the structure of a REST check.

    const restCheckDetails: RestCheckDetails = {
    type: 'rest',
    url: 'http://example.com/api/resource',
    method: 'GET',
    headers: {
    'Content-Type': 'application/json;',
    },
    body: JSON.stringify({ key: 'value' }),
    timeoutMs: 5000,
    expectedStatusCode: 200,
    expectedResponseBody: '{"status":"success"}',
    };
    type RestCheckDetails = {
        body?: string;
        expectedResponseBody?: string;
        expectedStatusCode?: number;
        headers?: Record<string, string>;
        method: string;
        timeoutMs?: number;
        type: "rest";
        url: string;
    }
    Index

    Properties

    body?: string

    Optional body being sent in the request. Be careful not to expose any sensitive information here. These are just examples.

    expectedResponseBody?: string

    Optional description of value in response body being checked for.

    expectedStatusCode?: number

    Optional expected HTTP status code for a successful response.

    headers?: Record<string, string>

    Optional headers being included in the request. Do not expose real authentication tokens here. These are just examples.

    method: string

    The HTTP method (e.g., GET, POST).

    timeoutMs?: number

    Optional in milliseconds for the request.

    type: "rest"

    The type of check, which is 'rest' for REST checks.

    url: string

    The URL being called.