Adding support for sending request headers in azure core rest request API (#16443)

* Adding support for sending additional headers in azure http requests

* Added session ids in all azure rest calls

* Fixed param name

* Adding default parameter value for request headers
This commit is contained in:
Aasim Khan
2021-07-27 12:36:50 -07:00
committed by GitHub
parent 35207a1e04
commit 7a35d4aeeb
11 changed files with 79 additions and 53 deletions

View File

@@ -271,8 +271,9 @@ declare module 'azurecore' {
* @param requestBody Optional request body to be used in PUT and POST requests.
* @param ignoreErrors When this flag is set the method will not throw any runtime or service errors and will return the errors in errors array.
* @param host Use this to override the host. The default host is https://management.azure.com
* @param requestHeaders Provide additional request headers
*/
makeAzureRestRequest(account: azdata.Account, subscription: azureResource.AzureResourceSubscription, path: string, requestType: HttpRequestMethod, requestBody?: any, ignoreErrors?: boolean, host?: string): Promise<AzureRestResponse>;
makeAzureRestRequest(account: azdata.Account, subscription: azureResource.AzureResourceSubscription, path: string, requestType: HttpRequestMethod, requestBody?: any, ignoreErrors?: boolean, host?: string, requestHeaders?: { [key: string]: string }): Promise<AzureRestResponse>;
/**
* Converts a region value (@see AzureRegion) into the localized Display Name
* @param region The region value