Skip to main content
Practice Problems

What is the difference between PUT and PATCH?

Introduction

This document explains the differences between the HTTP methods PUT and PATCH, focusing on their functionalities and characteristics.

Necessary Cookies

Uncategorized Cookies

Other uncategorized cookies are those that are being analyzed and have not yet been classified into a category. No cookies to display.

  • [Reject]
  • [Save my settings]
  • [Accept all]

Powered by

API Design Middle

Resource Update Method

PUT replaces the entire resource with a new representation. In simple terms, it expects you to send all fields that describe the resource, including those that do not require updating. PATCH, on the other hand, expects you to send only those fields that need updating.

Idempotence

According to HTTP semantics, PUT is an idempotent method. If you send it 10 times with the same body, it will yield the same result as if you sent it once. PATCH is not necessarily idempotent, and it all depends on the implementation.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.

Finished reading?
Practice Problems