Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cosmos response header key #311

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

justinbarclay
Copy link
Contributor

@justinbarclay justinbarclay commented Jun 19, 2021

This fixes #310.
The bug is that the sdk expects the "x-ms-max-item-count" HTTP response header for a Cosmos response. However, instead "x-ms-max-item-count" is an optional request header[1]. Instead a new const has been added, "x-ms-item-count", to coincide with the expected response header[2] from Cosmos requests.

[1] https://docs.microsoft.com/en-us/rest/api/cosmos-db/common-cosmosdb-rest-request-headers
[2] https://docs.microsoft.com/en-us/rest/api/cosmos-db/common-cosmosdb-rest-response-headers

This fixes a bug where the sdk expects the "x-ms-max-item-count" HTTP
response header for a Cosmos response. However, instead
"x-ms-max-item-count" is an optional request header[1]. Instead a new
const has been added, "x-ms-item-count", to coincide with the expected
response header[2] from Cosmos requests.

[1] https://docs.microsoft.com/en-us/rest/api/cosmos-db/common-cosmosdb-rest-request-headers
[2] https://docs.microsoft.com/en-us/rest/api/cosmos-db/common-cosmosdb-rest-response-headers
@ghost
Copy link

ghost commented Jun 19, 2021

CLA assistant check
All CLA requirements met.

Copy link
Contributor

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a bunch!

@rylev rylev merged commit e1fc0ea into Azure:master Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cosmos response headers uses the wrong header key
3 participants