easyMultiple Choice
CAS-004 Practice Question: A developer is creating a REST API that handles…
A developer is creating a REST API that handles sensitive data. Which HTTP method should be used for updates that are not idempotent?
⚠ Common exam trap
The key pitfall is that many candidates mistakenly believe PUT can be used for any update operation. However, PUT is idempotent, meaning it must result in the same state regardless of how many times it is applied. For non-idempotent updates (e.g., appending data), POST is the appropriate method because it can create side effects that change state differently with each request.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
POST
POST is correct because it is not idempotent, meaning multiple identical requests can result in different outcomes (e.g., creating a new resource each time). For updates that are not idempotent, POST is the appropriate HTTP method as it allows side effects such as appending data or triggering a process, unlike PUT which is idempotent and replaces the entire resource.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
DELETE
Why it's wrong here
DELETE is idempotent: repeating it leaves the resource absent, so it cannot express a non-idempotent update. It is tempting because DELETE modifies server state, but it is correct when removing a resource, whereas non-idempotent updates use POST.
- ✗
GET
Why it's wrong here
GET is a safe, read-only method, so it cannot modify a resource at all, let alone perform a non-idempotent update. It is tempting because it is the most familiar HTTP verb, and it would be correct when the API endpoint only retrieves sensitive data without changing server state.
- ✗
PUT
Why it's wrong here
PUT is idempotent: repeating the same request produces the same resource state, so it cannot satisfy the requirement for a non-idempotent update. It is tempting because PUT is the standard update verb, and it would be correct when the update replaces the resource identically on each retry.
- ✓
POST
Why this is correct
POST performs non-idempotent updates because each request can create a new subordinate resource or alter server state differently, satisfying the stem's requirement for updates that are not idempotent. Unlike PUT, which replaces a resource at a known URI idempotently, POST targets a collection or processing endpoint where repeated identical requests may produce distinct outcomes.
About these practice questions
Courseiva writes every CAS-005 question from scratch — 973 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.