Export HttpRequestBody type for who wants to implement a customized HTTP client.
This commit is contained in:
Родитель
6a59cb29eb
Коммит
e084d30146
|
@ -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 =
|
||||
|
|
Загрузка…
Ссылка в новой задаче