igpapi — Instagram private API Simulator for Node.js (API reference) 4.19.0
    Preparing search index...

    Interface HttpRenderTransportOptions

    interface HttpRenderTransportOptions {
        client?: HttpRequestRenderer;
        clientOptions?:
            | ClientOptions
            | ((request: TransportRequest) => ClientOptions);
        clients?: readonly ClientOptions[];
        respond?: (
            request: RenderedHttpRequest,
            services: Context<never>,
        ) => TransportResponse | Promise<TransportResponse>;
    }
    Index

    Properties

    The client that renders; pass this or clientOptions (which needs a profile).

    clientOptions?: ClientOptions | ((request: TransportRequest) => ClientOptions)

    The options of the client that renders, or a function that picks them per request. A function builds one client for each options value it returns and renders the request through the client of the value it returned for that request, so a caller that renders requests over more than one transport path (a protocolMode, for one) passes the same options object for every request of one path and keeps one client per path. The network-session pair (x-fb-appnetsession-nid / -sid) is the process's, so it is one value across those clients: the first pair any client renders is rendered for all of them.

    clients?: readonly ClientOptions[]

    The options of every client a clientOptions function may return, built here at once: each is registered with the process and confirmed here, where the caller gets its transport, so no request waits for the licence. A request whose options are not listed builds its client on demand: every request issued while that client is still confirming waits on its one confirmation (never per request), and once the process is confirmed a request on it goes on with no wait at all.

    respond?: (
        request: RenderedHttpRequest,
        services: Context<never>,
    ) => TransportResponse | Promise<TransportResponse>

    Answers each rendered request. services are the services of the fiber that sent it, so a caller can tell requests apart by what that fiber runs under (the conformance harness's cut).