1

I don't understand below sentence in MDN Document about PUT.

Successful response has body No

as if there was a response body, of course.

Because most of the other documents say it's possible, besides it must be used.

Could you explain the meaning of 'Successful response has body No' in MDN Document?

Minsik
  • 41
  • 5

1 Answers1

1

What's relevant aren't blog post or Wikipedia, but the specification (RFC 7231).

In general, any HTTP response can have a response body (except for a few special cases).

So yes, responses for a succesful PUT can have a reponse body, but normally, it does not make sense to include one. (What for?).

Julian Reschke
  • 40,156
  • 8
  • 95
  • 98
  • now I understand, could you check my sentence? the meaning is that PUT HTTP response just 'can' have response body, but it don't need to do because the results of the changed resources are already stated in the request. Instead, we just suggest subsequent get request. – Minsik Aug 06 '20 at 05:18
  • Why would you need a subsequent GET request? Because of the server *changing* the payload? In that case you may want to look at https://greenbytes.de/tech/webdav/rfc7240.html#return – Julian Reschke Aug 06 '20 at 05:24