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

Add Etag support #458

Merged
merged 3 commits into from Jul 8, 2016

Conversation

Projects
None yet
2 participants
@chinadragon0515
Contributor

chinadragon0515 commented Jul 5, 2016

Issues

*This pull request fixes issue #22 and #38

Description

For the support,

When an entity type whose has some properties with ConcurrencyCheck attribute, during get request, either single result or collection result, each return result will have "@odata.etag" annotation.

When request return a single entity and this setting is added "configuration.MessageHandlers.Add(new ETagMessageHandler());", the response Header will have Etag Header beside the "@odata.etag" annotation in response body.

During CRUD, If-Match and If-None-Match are checked.

If an item required etag, but during update/delete request, there is no If-Match or If-None-Match tag, should return 428 (precondition required).

Items not covered by above issue and need to be covered by this issue,

  1. For action bounded to single entity, and Etag is provided in header, it should be checked.

#114

Checklist (Uncheck if it is not completed)

  • [ x ] Test cases added
  • [ x ] Build and test with one-click build and test script passed

Additional work necessary

Need document update on how to use EtagMessageHandler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment