public async updateAppSettingViaKudu()

in src/appservice-rest/Kudu/azure-app-kudu-service.ts [73:98]


    public async updateAppSettingViaKudu(appSettings: Record<string, string>,
        retryCount: number = 1, retryIntervalSecond: number = 5, throwOnError: Boolean = true): Promise<any> {

        let httpRequest: WebRequest = {
            method: 'POST',
            uri: this._client.getRequestUri(`/api/settings`),
            body: JSON.stringify(appSettings)
        };
        const options: WebRequestOptions = {
            retriableStatusCodes: [404, 409, 500, 502, 503],
            retryCount: retryCount,
            retryIntervalInSeconds: retryIntervalSecond
        };

        try {            
            let response = await this._client.beginRequest(httpRequest, options, 'application/json');
            core.info(`Response with status code ${response.statusCode}`);
            return response;
        } catch (expt) {
            if (throwOnError) {
                throw new WebRequestError(httpRequest.uri, 'POST', 'Failed to update app settings via kudu', expt);
            } else {
                core.warning(`Failed to perform POST ${httpRequest.uri}`);
            }
        }
    }