How is a HTTP PUT request typically issued?

后端 未结 5 1941
天涯浪人
天涯浪人 2021-02-05 06:31

I know HTTP PUT is an idempotent request that store something at a specific URI, according to the definition (quoted from the rfc)

The PUT method requests that t         


        
5条回答
  •  逝去的感伤
    2021-02-05 07:18

    The enclosed entity is the payload data contained in the HTTP message body (after any transfer encodings have been removed.) If you're having trouble sending the message body then it could be that you've forgotten to include a Content-Length header - that's one of two ways to indicate that the HTTP message has a body.

    PUT is the same as POST except for this semantic difference: With POST the URI identifies a resource that will handle the entity, such as a servlet. With PUT the URI identifies the entity itself, for example a file that will be created/replaced with the contents of the entity body.

提交回复
热议问题