Developing Solutions for Microsoft Azure (AZ-204) Practice Exam

Disable ads (and more) with a membership for a one time $2.99 payment

Developing Solutions for Microsoft Azure Exam. Prepare with flashcards and multiple choice questions, get hints and explanations for each question. Ace your test prep!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which HTTP method is specifically used to update a resource with new values?

  1. PUT

  2. POST

  3. PATCH

  4. DELETE

The correct answer is: PATCH

The choice of PATCH is accurate in the context of updating resources but it's important to distinguish its specific use case among the listed methods. The PATCH method is designed for making partial updates to a resource, allowing you to alter only certain attributes without affecting the entire resource. This makes it an efficient choice when you need to change specific fields without sending the entire resource state. PUT, on the other hand, is another method used for updating resources but it has a different approach. It is intended to replace an entire resource with new content. If the resource doesn’t exist, PUT can also create it, but this replaces all existing data with the new input, which is more comprehensive than a simple update. POST is generally used for creating new resources and may also be used to submit data for processing or trigger actions on the server. Therefore, it doesn’t fit the specific requirement of updating an existing resource, even though it may sometimes be misused for that purpose. DELETE is utilized to remove a resource entirely from the server and is not related to updating any values. The methodology behind using PATCH makes it the most suitable choice when needing to update specific parts of an existing resource without a complete replacement, thus highlighting its specific role in RESTful interactions.