---
title: "Comment by Sébastien Portebois on \"HTTP PUT - Response Codes Explained\" | Hashnode"
description: "As you wrote, there’s regularly some debate. That’s why it’s also useful to have an authoritative source of truth to confirm what a server should do if we want"
url: "https://hashnode.com/posts/http-put-response-codes-explained/5f1134f78d953029bfb66dbf/comment/5f12efb9a02890430440956b"
---

[Discussion](https://hashnode.com/posts/http-put-response-codes-explained/5f1134f78d953029bfb66dbf)

Comment [HTTP PUT - Response Codes Explained](https://hashnode.com/posts/http-put-response-codes-explained/5f1134f78d953029bfb66dbf)

[Sébastien Portebois](https://hashnode.com/@sportebois)

[Jul 18, 2020](https://hashnode.com/posts/http-put-response-codes-explained/5f1134f78d953029bfb66dbf/comment/5f12efb9a02890430440956b)

As you wrote, there’s regularly some debate. That’s why it’s also useful to have an authoritative source of truth to confirm what a server should do if we want to make it follow the standards.

And that’s where RFC 7231 (section 4.3.4) comes in to confirm what you wrote:

> If the target resource does not have a current representation and the PUT successfully creates one, then the origin server MUST inform the user agent by sending a 201 (Created) response. If the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server MUST send either a 200 (OK) or a 204 (No Content) response to indicate successful completion of the request.

src: [tools.ietf.org/html/rfc7231](https://tools.ietf.org/html/rfc7231#section-4.3.4)

Every time such discussion starts in a design doc review or code review, following RFC is very helpful. We need very strong reason and special edge cases to pick non standard behaviors.

[Tech Hustler](https://hashnode.com/@tech_hustler)

[Jul 18, 2020](https://hashnode.com/posts/http-put-response-codes-explained/5f1134f78d953029bfb66dbf/comment/5f12efb9a02890430440956b#reply-5f13179ed038b843256010c9)

Hi Sebastien, this is super helpful and thank you so much for reading my article and taking time out to comment your suggestions.

I will keep in mind to refer authoritative sources going forward! Cheers!
