@azure/core-rest-pipeline
Advanced tools
Comparing version 1.1.0-beta.1 to 1.1.0-beta.2
# Release History | ||
## 1.1.0-beta.2 (2021-05-20) | ||
- Fixed an issue to set the `Content-Length` header correctly when using multibyte characters. [PR 15314](https://github.com/Azure/azure-sdk-for-js/pull/15314) | ||
### Fixed | ||
- Fixed an issue where tracing spans were not setting a status correctly (on success or error) which results in the span status being `UNSET`. In addition, we will now capture the HTTP status code when a request fails in the tracing span. [PR 15061](https://github.com/Azure/azure-sdk-for-js/pull/15061) | ||
## 1.1.0-beta.1 (2021-05-06) | ||
@@ -4,0 +12,0 @@ |
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
export const SDK_VERSION = "1.1.0-beta.1"; | ||
export const SDK_VERSION = "1.1.0-beta.2"; | ||
//# sourceMappingURL=constants.js.map |
@@ -267,3 +267,4 @@ // Copyright (c) Microsoft Corporation. | ||
} | ||
function getBodyLength(body) { | ||
/** @internal */ | ||
export function getBodyLength(body) { | ||
if (!body) { | ||
@@ -281,2 +282,5 @@ return 0; | ||
} | ||
else if (typeof body === "string") { | ||
return Buffer.from(body).length; | ||
} | ||
else { | ||
@@ -283,0 +287,0 @@ return null; |
@@ -47,2 +47,3 @@ // Copyright (c) Microsoft Corporation. | ||
request.method = "GET"; | ||
request.headers.delete("Content-Length"); | ||
delete request.body; | ||
@@ -49,0 +50,0 @@ } |
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
import { __awaiter } from "tslib"; | ||
import { getTraceParentHeader, createSpanFunction } from "@azure/core-tracing"; | ||
import { getTraceParentHeader, createSpanFunction, SpanStatusCode } from "@azure/core-tracing"; | ||
import { SpanKind } from "@azure/core-tracing"; | ||
@@ -63,9 +63,18 @@ import { URL } from "../util/url"; | ||
} | ||
span.end(); | ||
span.setStatus({ | ||
code: SpanStatusCode.OK | ||
}); | ||
return response; | ||
} | ||
catch (err) { | ||
span.end(); | ||
span.setStatus({ | ||
code: SpanStatusCode.ERROR, | ||
message: err.message | ||
}); | ||
span.setAttribute("http.status_code", err.statusCode); | ||
throw err; | ||
} | ||
finally { | ||
span.end(); | ||
} | ||
}); | ||
@@ -72,0 +81,0 @@ } |
@@ -25,2 +25,3 @@ // Copyright (c) Microsoft Corporation. | ||
"Accept", | ||
"Accept-Encoding", | ||
"Cache-Control", | ||
@@ -27,0 +28,0 @@ "Connection", |
{ | ||
"name": "@azure/core-rest-pipeline", | ||
"version": "1.1.0-beta.1", | ||
"version": "1.1.0-beta.2", | ||
"description": "Isomorphic client library for making HTTP requests in node.js and browser.", | ||
@@ -5,0 +5,0 @@ "sdk-type": "client", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
565707
6065
320
17
33
4
166