in src/appservice-rest/Kudu/azure-app-kudu-service.ts [343:375]
public async warDeploy(webPackage: string, queryParameters?: Array<string>): Promise<any> {
let httpRequest: WebRequest = {
method: 'POST',
uri: this._client.getRequestUri(`/api/wardeploy`, queryParameters),
body: fs.createReadStream(webPackage)
};
try {
let response = await this._client.beginRequest(httpRequest, null, 'application/octet-stream');
core.debug(`War Deploy response: ${JSON.stringify(response)}`);
if(response.statusCode == 200) {
core.debug('Deployment passed');
return null;
}
else if(response.statusCode == 202) {
let pollableURL: string = response.headers.location;
if(!!pollableURL) {
core.debug(`Polling for War Deploy URL: ${pollableURL}`);
return await this._getDeploymentDetailsFromPollURL(pollableURL);
}
else {
core.debug('war deploy returned 202 without pollable URL.');
return null;
}
}
else {
throw response;
}
}
catch(error) {
throw Error("Failed to deploy web package to App Service.\n" + this._getFormattedError(error));
}
}