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 {
    Headers: {
        prototype: Headers;
        new (init?): Headers;
    };
    Request: {
        prototype: Request;
        new (input, init?): Request;
    };
    WebSocket: {
        CLOSED: 3;
        CLOSING: 2;
        CONNECTING: 0;
        OPEN: 1;
        prototype: WebSocket;
        new (url, protocols?): WebSocket;
    };
    appUrl: string;
    appendToken: boolean;
    baseUrl: string;
    fetch: ((input, init?) => Promise<Response>);
    init: RequestInit;
    serializer: ISerializer;
    token: string;
    wsUrl: string;
}

Properties

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

The Headers object constructor.

Type declaration

Request: {
    prototype: Request;
    new (input, init?): Request;
}

The Request object constructor.

Type declaration

    • new (input, init?): Request
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Request

  • prototype: Request
WebSocket: {
    CLOSED: 3;
    CLOSING: 2;
    CONNECTING: 0;
    OPEN: 1;
    prototype: WebSocket;
    new (url, protocols?): WebSocket;
}

The WebSocket object constructor.

Type declaration

    • new (url, protocols?): WebSocket
    • Parameters

      • url: string | URL
      • Optional protocols: string | string[]

      Returns WebSocket

  • Readonly CLOSED: 3
  • Readonly CLOSING: 2
  • Readonly CONNECTING: 0
  • Readonly OPEN: 1
  • prototype: WebSocket
appUrl: string

The app url of the JupyterLab application.

appendToken: boolean

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

baseUrl: string

The base url of the server.

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

The fetch method to use.

Type declaration

init: RequestInit

The default request init options.

serializer: ISerializer

Serializer used to serialize/deserialize kernel messages.

token: string

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

wsUrl: string

The base ws url of the server.