Export HttpRequestBody type for who wants to implement a customized HTTP client.

This commit is contained in:
FAREAST\jiacfan 2019-01-07 14:49:39 +08:00 коммит произвёл Vincent Jiang (LEI)
Родитель 6a59cb29eb
Коммит e084d30146
3 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -9,6 +9,7 @@
* Updated server timeout value for retry options `tryTimeoutInMs` to 30 seconds.
* Fixed `Aborter.timeout()` misleading scale description.
* Fixed an issue that enqueue/dequeue/peek fail to work with some utf8 characters.
* Exported HttpRequestBody type for who wants to implement a customized HTTP client.
2018.12 Version 10.0.0-preview

Просмотреть файл

@ -5,6 +5,7 @@ import {
HttpOperationResponse,
HttpPipelineLogger as IHttpPipelineLogger,
HttpPipelineLogLevel,
HttpRequestBody,
RequestPolicy,
RequestPolicyFactory,
RequestPolicyOptions,
@ -20,6 +21,7 @@ export {
HttpHeaders,
HttpPipelineLogLevel,
HttpOperationResponse,
HttpRequestBody,
WebResource,
BaseRequestPolicy,
RequestPolicyFactory,

Просмотреть файл

@ -52,7 +52,7 @@ export class SharedKeyCredentialPolicy extends CredentialPolicy {
typeof request.body === "string" &&
request.body.length > 0
) {
request.headers.set(HeaderConstants.CONTENT_LENGTH, request.body ? Buffer.byteLength(request.body,'utf8') : 0);
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
}
const stringToSign: string =