RPCClientOptions | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Interface RPCClientOptions

    interface RPCClientOptions {
        baseUrl?: string;
        debug?: boolean;
        headers?: Record<string, string>;
        onBeforeRequest?: (
            url: URL,
            requestInit: RequestInit & { headers: Headers },
        ) => void;
        onResponse?: (response: Response) => void;
        retry429?: boolean;
        signal?: AbortSignal;
        silent?: boolean;
        timeout?: number;
    }
    Index

    Properties

    baseUrl?: string

    Base URL for service paths

    debug?: boolean

    Debug (Follows 'rpc' debugflag if not explicity specified)

    headers?: Record<string, string>

    Headers to submit (Eg Authorization)

    onBeforeRequest?: (
        url: URL,
        requestInit: RequestInit & { headers: Headers },
    ) => void

    Custom request update. Use to eg. set keepalive or add debug variables to the URL

    onResponse?: (response: Response) => void

    Response callback. Use this if you need to capture details on the incoming respones. May be invoked multiple times per request, eg due to 429 errors!

    retry429?: boolean

    Retry on 429

    signal?: AbortSignal

    Abort signal to cancel the RPC

    silent?: boolean

    Silent - do not log errors

    timeout?: number

    Call timeout