The
HTTP
PUT
request method
creates a new resource or replaces a representation of the target resource with the request payload.
The difference between
PUT
and
POST
is that
PUT
is idempotent: calling it once or several times successively has the same effect (that is no
side
effect), whereas successive identical
POST
requests may have additional effects, akin to placing an order several times.
PUT
/
new.html
HTTP/1.1
<
p
>
New File
</
p
>
If the target resource does not have a current representation and the
PUT
request 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.
BCD tables only load in the browser