public reportStatusDownload()

in src/script/acquisition-sdk.ts [209:232]


    public reportStatusDownload(downloadedPackage: Package, callback?: Callback<void>): void {
        var url: string = this._serverUrl + this._publicPrefixUrl + "report_status/download";
        var body: DownloadReport = {
            client_unique_id: this._clientUniqueId,
            deployment_key: this._deploymentKey,
            label: downloadedPackage.label
        };

        this._httpRequester.request(Http.Verb.POST, url, JSON.stringify(body), (error: Error, response: Http.Response): void => {
            if (callback) {
                if (error) {
                    callback(error, /*not used*/ null);
                    return;
                }

                if (response.statusCode !== 200) {
                    callback(new CodePushHttpError(response.statusCode + ": " + response.body), /*not used*/ null);
                    return;
                }

                callback(/*error*/ null, /*not used*/ null);
            }
        });
    }