A Jupyter server settings object. Note that all of the settings are optional when passed to [[makeSettings]]. The default settings are given in [[defaultSettings]].

interface ISettings {
    appendToken: boolean;
    appUrl: string;
    baseUrl: string;
    fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
    Headers: { prototype: Headers; new (init?: HeadersInit): Headers };
    init: RequestInit;
    Request: {
        prototype: Request;
        new (input: RequestInfo | URL, init?: RequestInit): Request;
    };
    serializer: ISerializer;
    token: string;
    WebSocket: {
        CLOSED: 3;
        CLOSING: 2;
        CONNECTING: 0;
        OPEN: 1;
        prototype: WebSocket;
        new (url: string | URL, protocols?: string | string[]): WebSocket;
    };
    wsUrl: string;
}

Properties

appendToken: boolean

Whether to append a token to a Websocket url. The default is false in the browser and true in node or jest.

appUrl: string

The app url of the JupyterLab application.

baseUrl: string

The base url of the server.

fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>

The fetch method to use.

Headers: { prototype: Headers; new (init?: HeadersInit): Headers }

The Headers object constructor.

init: RequestInit

The default request init options.

Request: {
    prototype: Request;
    new (input: RequestInfo | URL, init?: RequestInit): Request;
}

The Request object constructor.

serializer: ISerializer

Serializer used to serialize/deserialize kernel messages.

token: string

The authentication token for requests. Use an empty string to disable.

WebSocket: {
    CLOSED: 3;
    CLOSING: 2;
    CONNECTING: 0;
    OPEN: 1;
    prototype: WebSocket;
    new (url: string | URL, protocols?: string | string[]): WebSocket;
}

The WebSocket object constructor.

wsUrl: string

The base ws url of the server.