Discuss this help topic in SecureBlackbox Forum

TElHTTPSClient.Put

TElHTTPSClient     See also     


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


Sends the PUT request to server.

Declaration

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

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

[Pascal]
    function Put(const URL: string): integer;
    function Put(const URL: string; const Content: string): integer;
    function Put(const URL: string; const Content: ByteArray): integer;
    function Put(const URL: string; Content: TStream; FreeContent: Boolean = False): integer;

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

[PHP]
    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 - specifies resource address. This method does NOT encode the parameters that you pass in the URL, they need to be encoded prior to calling the method.
  • Content - stream with data
  • FreeContent - specifies if Content object should be freed after request execution. Default value is False
  • StartIndex - ...
  • Count - ...
  • CloseStream - ...

Return value

    HTTP result code

Description

    Use this method to send 'PUT' request to server. PUT method is used to write data to server. Note: server may not allow using of this method.

    The variant of the method with only URL parameter lets you stream the data dynamically via OnHTTPDynamicDataNeeded event. Note that not all servers support such streaming.

    To POST/PUT several streams you can use TElMultiStream class: create an instance of this class, add the streams to the TElMultiStream object using AddStream method, and pass the instance of TElMultiStream to Post/Put method.

See also:     Delete     Post     Get     Options     Trace     Head     OnDynamicDataNeeded     TElMultiStream    

Discuss this help topic in SecureBlackbox Forum