@libp2p/http
    Preparing search index...

    Interface HTTPInit

    Options to configure the HTTP service.

    Only required if you want to specify a custom fetch implementation or used to provide one if your environment does not have a global fetch.

    interface HTTPInit {
        authTokenTTL?: number;
        cookieExpiryCheckInterval?: number;
        middleware?: ((components: any) => Middleware)[];
        server?: WebServer;
    }
    Index

    Properties

    authTokenTTL?: number

    How long in ms an auth token for a server will be valid for, defaults to one hour

    360_000
    
    cookieExpiryCheckInterval?: number

    How often to evict stale cookies from the cache in ms.

    Nb. cookies are checked for expiry before sending, this setting just prevents persisting cookies indefinitely for servers that are contacted infrequently.

    60_000
    
    middleware?: ((components: any) => Middleware)[]

    A list of request processors that can augment requests. Middleware passed here will be invoked on every outgoing request.

    server?: WebServer

    A server that will receive incoming requests