in src/appservice-rest/Kudu/azure-app-kudu-service.ts [100:124]
public async deleteAppSettingViaKudu(appSetting: string,
retryCount: number = 1, retryIntervalSecond: number = 5, throwOnError: Boolean = true): Promise<any> {
const httpRequest: WebRequest = {
method: 'DELETE',
uri: this._client.getRequestUri(`/api/settings/${appSetting}`)
};
const options: WebRequestOptions = {
retriableStatusCodes: [404, 409, 500, 502, 503],
retryCount: retryCount,
retryIntervalInSeconds: retryIntervalSecond
};
try {
const 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, 'DELETE', 'Failed to delete app setting via kudu', expt);
} else {
core.warning(`Failed to perform DELETE ${httpRequest.uri}`);
}
}
}