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

    Type Alias RPCContext

    type RPCContext = {
        getOriginURL: () => string | null;
        getRequestUser: (wrdSchema: AnyWRDSchema) => Promise<number | null>;
        method: string;
        request: SupportedRequestSubset & { clientIp: string };
        responseHeaders: Headers;
    }
    Index

    Properties

    getOriginURL: () => string | null

    Get the URL of the caller

    getRequestUser: (wrdSchema: AnyWRDSchema) => Promise<number | null>

    Get the WRDAuth verified user that made the call (based on either login cookie or authorization header )

    method: string

    The function/method invoked (unrelated to the request.method which is currently always POST for WebHare RPCs)

    request: SupportedRequestSubset & { clientIp: string }

    The RPC request

    responseHeaders: Headers

    Response headers