Courseiva
easyMultiple ChoiceObjective-mapped

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; deleting a resource multiple times yields the same outcome.

  • GET

    Why it's wrong here

    GET is a safe, idempotent method used for retrieval, not updates.

  • PUT

    Why it's wrong here

    PUT is idempotent; repeated calls produce the same result.

  • POST

    Why this is correct

    POST is non-idempotent and suitable for operations that create or update resources with potentially different results on each call.

About these practice questions

Courseiva writes every CAS-005 question from scratch — 968 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 →

How Courseiva writes practice questions · Editorial policy

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.