ibm-cloud-sdk-core
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -41,4 +41,5 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
| [getHttpClient()](./ibm-cloud-sdk-core.baseservice.gethttpclient.md) | | Get the Axios instance set on the service. All requests will be made using this instance. | | ||
| [setDefaultHeaders(headers)](./ibm-cloud-sdk-core.baseservice.setdefaultheaders.md) | | Set the HTTP headers to be sent in every request. | | ||
| [setEnableGzipCompression(setting)](./ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md) | | Turn request body compression on or off. | | ||
| [setServiceUrl(url)](./ibm-cloud-sdk-core.baseservice.setserviceurl.md) | | Set the service URL to send requests to. | | ||
@@ -0,1 +1,8 @@ | ||
# [3.1.0](https://github.com/IBM/node-sdk-core/compare/v3.0.1...v3.1.0) (2022-07-28) | ||
### Features | ||
* add `setDefaultHeaders` method on base service class ([#207](https://github.com/IBM/node-sdk-core/issues/207)) ([29bec13](https://github.com/IBM/node-sdk-core/commit/29bec13b67ea08071be488af62b919899f21ec50)) | ||
## [3.0.1](https://github.com/IBM/node-sdk-core/compare/v3.0.0...v3.0.1) (2022-07-28) | ||
@@ -2,0 +9,0 @@ |
@@ -91,2 +91,8 @@ /** | ||
/** | ||
* Set the HTTP headers to be sent in every request. | ||
* | ||
* @param {OutgoingHttpHeaders} headers The map of headers to include in requests. | ||
*/ | ||
setDefaultHeaders(headers: OutgoingHttpHeaders): void; | ||
/** | ||
* Turn request body compression on or off. | ||
@@ -93,0 +99,0 @@ * |
@@ -94,2 +94,14 @@ /** | ||
/** | ||
* Set the HTTP headers to be sent in every request. | ||
* | ||
* @param {OutgoingHttpHeaders} headers The map of headers to include in requests. | ||
*/ | ||
setDefaultHeaders(headers) { | ||
if (typeof headers !== 'object') { | ||
// do nothing, for now | ||
return; | ||
} | ||
this.baseOptions.headers = headers; | ||
} | ||
/** | ||
* Turn request body compression on or off. | ||
@@ -96,0 +108,0 @@ * |
@@ -67,2 +67,3 @@ ## API Report File for "ibm-cloud-sdk-core" | ||
getHttpClient(): AxiosInstance; | ||
setDefaultHeaders(headers: OutgoingHttpHeaders): void; | ||
setEnableGzipCompression(setting: boolean): void; | ||
@@ -69,0 +70,0 @@ setServiceUrl(url: string): void; |
@@ -91,2 +91,8 @@ /** | ||
/** | ||
* Set the HTTP headers to be sent in every request. | ||
* | ||
* @param {OutgoingHttpHeaders} headers The map of headers to include in requests. | ||
*/ | ||
setDefaultHeaders(headers: OutgoingHttpHeaders): void; | ||
/** | ||
* Turn request body compression on or off. | ||
@@ -93,0 +99,0 @@ * |
@@ -110,2 +110,14 @@ "use strict"; | ||
/** | ||
* Set the HTTP headers to be sent in every request. | ||
* | ||
* @param {OutgoingHttpHeaders} headers The map of headers to include in requests. | ||
*/ | ||
BaseService.prototype.setDefaultHeaders = function (headers) { | ||
if (typeof headers !== 'object') { | ||
// do nothing, for now | ||
return; | ||
} | ||
this.baseOptions.headers = headers; | ||
}; | ||
/** | ||
* Turn request body compression on or off. | ||
@@ -112,0 +124,0 @@ * |
{ | ||
"name": "ibm-cloud-sdk-core", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -67,2 +67,3 @@ ## API Report File for "ibm-cloud-sdk-core" | ||
getHttpClient(): AxiosInstance; | ||
setDefaultHeaders(headers: OutgoingHttpHeaders): void; | ||
setEnableGzipCompression(setting: boolean): void; | ||
@@ -69,0 +70,0 @@ setServiceUrl(url: string): void; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1429670
363
28197