Bird
0
0

You need to design a REST API where clients can update user profiles partially or fully. Which HTTP methods should you support?

hard📝 Application Q8 of 15
Rest API - REST API Fundamentals
You need to design a REST API where clients can update user profiles partially or fully. Which HTTP methods should you support?
AGET and DELETE
BPOST and GET
CPUT and PATCH
DDELETE and PATCH
Step-by-Step Solution
Solution:
  1. Step 1: Identify methods for updating resources

    PUT is for full updates, PATCH is for partial updates of resources.
  2. Step 2: Exclude unrelated methods

    GET retrieves data, POST creates, DELETE removes; they don't update partially or fully.
  3. Final Answer:

    PUT and PATCH -> Option C
  4. Quick Check:

    Partial/full update = PUT and PATCH [OK]
Quick Trick: PUT for full, PATCH for partial updates [OK]
Common Mistakes:
MISTAKES
  • Using POST for updates
  • Confusing DELETE with update
  • Ignoring PATCH for partial updates

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes