@azure/core-client 1.4.1-alpha.20220131.3 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -4
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/interfaces.js.map +1 -1
- package/dist-esm/src/serviceClient.js +11 -0
- package/dist-esm/src/serviceClient.js.map +1 -1
- package/package.json +4 -4
- package/types/3.1/core-client.d.ts +20 -0
- package/types/latest/core-client.d.ts +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.5.0 (2022-02-03)
|
|
4
4
|
|
|
5
5
|
### Features Added
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Added new `CommonClientOptions` member `additionalPolicies` to allow passing custom pipeline policies to client constructors. [PR #19920](https://github.com/Azure/azure-sdk-for-js/pull/19920)
|
|
8
8
|
|
|
9
9
|
### Bugs Fixed
|
|
10
10
|
|
|
11
11
|
- Addressed an issue where the `onResponse` callback wouldn't be called in certain cases where an unexpected response was received from the service. [PR #19702](https://github.com/Azure/azure-sdk-for-js/pull/19702)
|
|
12
12
|
|
|
13
|
-
### Other Changes
|
|
14
|
-
|
|
15
13
|
## 1.4.0 (2022-01-06)
|
|
16
14
|
|
|
17
15
|
### Features Added
|
package/dist/index.js
CHANGED
|
@@ -1808,11 +1808,22 @@ class ServiceClient {
|
|
|
1808
1808
|
* @param options - The service client options that govern the behavior of the client.
|
|
1809
1809
|
*/
|
|
1810
1810
|
constructor(options = {}) {
|
|
1811
|
+
var _a;
|
|
1811
1812
|
this._requestContentType = options.requestContentType;
|
|
1812
1813
|
this._baseUri = options.baseUri;
|
|
1813
1814
|
this._allowInsecureConnection = options.allowInsecureConnection;
|
|
1814
1815
|
this._httpClient = options.httpClient || getCachedDefaultHttpClient();
|
|
1815
1816
|
this.pipeline = options.pipeline || createDefaultPipeline(options);
|
|
1817
|
+
if ((_a = options.additionalPolicies) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1818
|
+
for (const { policy, position } of options.additionalPolicies) {
|
|
1819
|
+
// Sign happens after Retry and is commonly needed to occur
|
|
1820
|
+
// before policies that intercept post-retry.
|
|
1821
|
+
const afterPhase = position === "perRetry" ? "Sign" : undefined;
|
|
1822
|
+
this.pipeline.addPolicy(policy, {
|
|
1823
|
+
afterPhase,
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1816
1827
|
}
|
|
1817
1828
|
/**
|
|
1818
1829
|
* Send the provided httpRequest.
|