Refer to the exhibit. Two editors are concurrently updating an article's headline from their mobile devices. What results from this scenario based on this REST API sequence?
The correct answer is D.
Client1 - GET and API Service return the ETag ed5 with the title Monday Headlines
Client2 - GET and API Service return the ETag ed5 with the title Monday Headlines
Client1 - PUT the title from Monday Headlines to Top Headlines and received 200 with a new ETag 980f - It's meaning that the title has been changed and the ETag has been updated.
Client2 - Try to change the title using the old ETag ed5 and receives 412 which means "Precondition Failed" since the ETag has changed.
With unsafe methods (PUT and DELETE), conditions are used to allow modifications to a resource only when it’s still the same and hasn’t changed since the last interaction.
The following headers specify a condition for the request:
- “If-Match”: Set to previously known “ETag” value. The condition is true if the ETag of the resource on a server is equal to the one supplied in this header. Only a strong ETag may be used, as weak tags never match under this comparison.
- “If-Unmodified-Since”: Set to the previously known “Last-Modified” value. The condition is true if the date of the resource on a server is the same or older than the one listed in this header.
If the condition is true (that is, the resource has not changed), then the server proceeds with the update as normal. If the condition is not met, then the change is rejected with a 412 “Precondition Failed” error.
Client 1 already change the title for resource 17f0fff99ed5 so when
Client 2 tries to change it too, hes a little to late already somebody got her already thats why he got rejected, access to the target resource has been denied, too bad, shes not there anymore ;)
I mean Return Code 412 indicates....
PRECONDITION FAILED One or more conditions given in the request header fields evaluated to false when tested on the server.
I agree with D because Return Code indicates:
PRECONDITION FAILED
One or more conditions given in the request header fields evaluated to false when tested on the server.
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.350-901 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
lente_kriebels
Highly Voted 2 years, 10 months agoisaacmejia
Most Recent 7 months agoTeringzooi
1 year, 9 months agodesignated
1 year, 10 months agodesignated
1 year, 10 months ago__al__
2 years, 2 months agodexilec82
2 years, 4 months agoGuillaume
2 years, 6 months agoudo2020
2 years, 6 months agoudo2020
2 years, 6 months ago