-
Notifications
You must be signed in to change notification settings - Fork 66
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
Implement ETag #484
Implement ETag #484
Conversation
🎉 Thank you for your code contribution! To guarantee the change/addition is conformant to the OCF Specification, we would like to ask you to execute OCF Conformance Testing of your change ☝️ when your work is ready to be reviewed. ℹ️ To verify your latest change (e30e3cc), label this PR with |
8d4eedf
to
6fe77bf
Compare
6fe77bf
to
3927496
Compare
91404e9
to
03f5786
Compare
* move setter and getter functions to coap_options.h * add tests
c7a53e8
to
33e6217
Compare
357b4aa
to
08e2fb8
Compare
161b338
to
243edd0
Compare
6e56b6e
to
c3020b8
Compare
cea0bac
to
86a4e55
Compare
19fec75
to
16a8bee
Compare
This commit introduces the Entity Tag (ETag) feature, enabling resources to have their own ETag values. The ETag value of a resource can be updated by calling either oc_resource_update_etag or oc_notify_resource_changed, the latter also notifying observers if the resource is observable. If a resource supports POST or PUT requests, its ETag is automatically updated upon a successful request. The value of the ETag is based on the system time, using oc_clock_time(). If OC_STORAGE is enabled, the current ETag can be stored and loaded from storage. For more details on the public API, refer to the etag.h header file. In CoAP responses to GET requests addressed to a specific resource, the ETag is included in CoAP options if the response code is Content (2.05) or Valid (2.03). If a GET request contains an ETag in CoAP options that matches the ETag of the addressed resource, the response code will be Valid (2.03), and no data will be included in the response. These changes enhance the efficiency of resource handling in the IoTivity-lite library.
16a8bee
to
9649776
Compare
SonarCloud Quality Gate failed. 0 Bugs 91.4% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
No description provided.