Discuss this help topic in SecureBlackbox Forum

TElHTTPSWebDAVClient.Put

TElHTTPSWebDAVClient     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Sends the PUT request to the server.

Declaration

[C#/Java]
    int Put(string URL, string Content, string IfHeader /* = "" */);
    int Put(string URL, byte[] Content, string IfHeader /* = "" */);
    int Put(string URL, byte[] Content, int StartIndex, int Count, string IfHeader /* = "" */);
    int Put(string URL, System.IO.Stream Content, bool CloseStream /* = false */, string IfHeader /* = "" */);

[VB.NET]
    Function Put(ByVal URL As String, ByVal Content As String, ByVal IfHeader As String = "") As Integer
    Function Put(ByVal URL As String, ByVal Content As Byte(), ByVal IfHeader As String = "") As Integer
    Function Put(ByVal URL As String, ByVal Content As Byte(), ByVal StartIndex As Integer, ByVal Count As Integer, ByVal IfHeader As String = "") As Integer
    Function Put(ByVal URL As String, ByVal Content As System.IO.Stream, ByVal CloseStream As Boolean = False, ByVal IfHeader As String = "") As Integer

[Pascal]
    function Put(const URL : string; const Content : string; const IfHeader : string = "") : integer;
    function Put(const URL : string; const Content : ByteArray; const IfHeader : string = "") : integer;
    function Put(const URL : string; const Content : ByteArray; StartIndex : integer; Count : integer; const IfHeader : string = "") : integer;
    function Put(const URL : string; Content : TStream; CloseStream : boolean = false; const IfHeader : string = "") : integer;

[C++]
    int32_t Put(const std::string &URL, const std::string &Content, const std::string &IfHeader);
    int32_t Put(const std::string &URL, const std::vector<uint8_t> &Content, const std::string &IfHeader);
    int32_t Put(const std::string &URL, const std::vector<uint8_t> &Content, int32_t StartIndex, int32_t Count, const std::string &IfHeader);
    int32_t Put(const std::string &URL, TStream &Content, bool CloseStream, const std::string &IfHeader);
    int32_t Put(const std::string &URL, TStream *Content, bool CloseStream, const std::string &IfHeader);

[PHP]
    integer Put(string $URL, string $Content, string $IfHeader)
    integer Put(string $URL, array of byte|string|NULL $Content, string $IfHeader)
    integer Put(string $URL, array of byte|string|NULL $Content, integer $StartIndex, integer $Count, string $IfHeader)
    integer Put(string $URL, TStream $Content, bool $CloseStream, string $IfHeader)
    integer Put(string $URL)
    integer Put(string $URL, string $Content)
    integer Put(string $URL, array of byte|string|NULL $Content)
    integer Put(string $URL, array of byte|string|NULL $Content, integer $StartIndex, integer $Count)
    integer Put(string $URL, TStream $Content, bool $CloseStream)

Parameters

  • URL - URL of the resource where to write the data.
  • Content - stream with the data to be written.
  • StartIndex - position in the Content stream from which to start reading data.
  • Count - number of bytes to be read from the Content stream.
  • CloseStream - specifies if the Content stream should be freed after execution.
  • IfHeader - specifies the If header of the request.

Return value

    On success, returns server status code, otherwise returns -1.

Description

    Use this method to send 'PUT' request to server. PUT method is used to write data to server.

Discuss this help topic in SecureBlackbox Forum