@azure/core-client
Advanced tools
Comparing version 1.0.0-beta.2 to 1.0.0
# Release History | ||
## 1.0.0 (2021-03-15) | ||
GA release of this package. | ||
## 1.0.0-beta.2 (2021-03-10) | ||
@@ -4,0 +8,0 @@ |
@@ -34,3 +34,7 @@ // Copyright (c) Microsoft Corporation. | ||
} | ||
function serializeHeaders(request, operationArguments, operationSpec) { | ||
/** | ||
* @internal | ||
*/ | ||
export function serializeHeaders(request, operationArguments, operationSpec) { | ||
var _a, _b; | ||
if (operationSpec.headerParameters) { | ||
@@ -54,2 +58,8 @@ for (const headerParameter of operationSpec.headerParameters) { | ||
} | ||
const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; | ||
if (customHeaders) { | ||
for (const customHeaderName of Object.keys(customHeaders)) { | ||
request.headers.set(customHeaderName, customHeaders[customHeaderName]); | ||
} | ||
} | ||
} | ||
@@ -56,0 +66,0 @@ /** |
@@ -66,7 +66,2 @@ // Copyright (c) Microsoft Corporation. | ||
if (requestOptions) { | ||
if (requestOptions.customHeaders) { | ||
for (const customHeaderName of Object.keys(requestOptions.customHeaders)) { | ||
request.headers.set(customHeaderName, requestOptions.customHeaders[customHeaderName]); | ||
} | ||
} | ||
if (requestOptions.timeout) { | ||
@@ -73,0 +68,0 @@ request.timeout = requestOptions.timeout; |
@@ -116,6 +116,3 @@ // Copyright (c) Microsoft Corporation. | ||
} | ||
// ignore empty values | ||
if (queryParameterValue) { | ||
result.set(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue); | ||
} | ||
result.set(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue); | ||
} | ||
@@ -122,0 +119,0 @@ } |
{ | ||
"name": "@azure/core-client", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0", | ||
"description": "Core library for interfacing with AutoRest generated code", | ||
@@ -105,3 +105,3 @@ "sdk-type": "client", | ||
"inherits": "^2.0.3", | ||
"karma": "^5.1.0", | ||
"karma": "^6.2.0", | ||
"karma-chrome-launcher": "^3.0.0", | ||
@@ -108,0 +108,0 @@ "karma-coverage": "^2.0.0", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4935
0
541225