Skip to content

Commit

Permalink
Export HttpRequestBody type for who wants to implement a customized H…
Browse files Browse the repository at this point in the history
…TTP client.
  • Loading branch information
jiacfan authored and vinjiang committed Jan 18, 2019
1 parent 6a59cb2 commit e084d30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions queue/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions queue/lib/Pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
HttpOperationResponse,
HttpPipelineLogger as IHttpPipelineLogger,
HttpPipelineLogLevel,
HttpRequestBody,
RequestPolicy,
RequestPolicyFactory,
RequestPolicyOptions,
Expand All @@ -20,6 +21,7 @@ export {
HttpHeaders,
HttpPipelineLogLevel,
HttpOperationResponse,
HttpRequestBody,
WebResource,
BaseRequestPolicy,
RequestPolicyFactory,
Expand Down
2 changes: 1 addition & 1 deletion queue/lib/policies/SharedKeyCredentialPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit e084d30

Please sign in to comment.