@libp2p/http
    Preparing search index...

    Interface Middleware

    Middleware that allows augmenting the client request/response with additional fields or headers.

    interface Middleware {
        prepareRequest(
            resource: URL | Multiaddr[],
            opts: MiddlewareOptions,
        ): void | Promise<void>;
        processResponse(
            resource: URL | Multiaddr[],
            opts: MiddlewareOptions,
            response: Response,
        ): void | Promise<void>;
    }

    Implemented by

    Index

    Methods