MonoCloud Authentication SDK
    Preparing search index...

    Represents an outgoing HTTP response with common helper methods.

    interface MonoCloudResponse {
        done(): any;
        internalServerError(): void;
        methodNotAllowed(): void;
        noContent(): void;
        notFound(): void;
        redirect(url: string, statusCode?: number): void;
        sendJson(data: any, statusCode?: number): void;
        setCookie(
            cookieName: string,
            value: string,
            options: CookieOptions,
        ): Promise<void>;
        setNoCache(): void;
    }

    Hierarchy

    Index

    Methods

    • Redirects the client to the specified URL.

      Parameters

      • url: string

        The URL to redirect to.

      • OptionalstatusCode: number

        The HTTP status code to use for the redirect.

      Returns void

    • Sends a JSON response with an optional status code.

      Parameters

      • data: any

        The data to serialize and send as JSON.

      • OptionalstatusCode: number

        The HTTP status code for the response.

      Returns void