Plasma GitLab Archive
Projects Blog Knowledge

Class Webdav_client_methods.put


class put : ?content_type:string -> ?content_length:int64 -> ?expect_handshake:bool -> ?strip_prefix:string -> string -> Netmime.mime_body -> put_call_t
new put url body: Uploads the contents of body to the server so it will be visible at url.

  • content_type: The media type of the body. The server is free to ignore this.
  • content_length: The length of the body, if already known. There are servers that accept PUT only if the content length is set in the header.
  • expect_handshake: Set this to true to enable a special handshake before the body is uploaded. This is reasonable when the PUT request may cause errors - the error can be received before the upload starts. There might be compatibility problems, though, as this feature was incorrectly specified in some versions of HTTP.
Note that some servers do not permit that existing files are replaced. The RFC says nothing about this case, though.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml