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

    Type Alias AnalyticsUpload

    AnalyticsUpload: {
        clientProfile?: ClientProfile;
        endpoint: AnalyticsEndpoint;
        headers: HttpHeaders;
    } & (
        | { body: Buffer; bodyWrites?: undefined }
        | { body?: undefined; bodyWrites: ReadonlyArray<Buffer> }
    )

    One prepared analytics upload: the endpoint it is for, its own headers and body. The host, the path and the method are the delivery's, not the caller's — an analytics upload cannot be pointed anywhere else. Which of the app's network stacks writes it is the platform channel's to say (clientProfile: absent for the app's main stack), and so is how the body is written — sized (body) or as the stack streams it (bodyWrites, an unknown-size body in the connection's own chunks); the delivery only hands both to the request layer.