company logo

HTTP :: PUT - HTTP POST request

The function supports sending data passed in sQuery (HTTP PUT request) to the WEB server passed in sURL .Response data returned from the server is stored in a result area and may be obtained by calling result() . The result area will be cleared when submitting the next HTTP request.

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false .

Implementation overview

Implementation details

  1. Submitting data with default header
    bool HTTP  :: PUT ( odaba::String &sURL, odaba::Binary &cBinary )

    The function posts the binary data passed in binary converted to a base64 string creating a default header, which may be displayed when creating the HTTP instance with bVerbose option set to true ..

    • sURL - URI string

      The URL string is a Uniform Resource Identifier (URI) with the following syntax:

      [scheme:][//host[:port]/]path[?query][#fragment]

      At least, a path is required for a valid URI.

    • cBinary - Binary data block handle

      Constant reference to a binary data block handle, which may contain binary data up to 2 GB.

  2. to list
  3. Submitting data with specific header data
    bool HTTP  :: PUT ( odaba::String &sURL, odaba::Binary &cBinary, odaba::String &sHeader )

    The function posts the binary data passed in binary converted to a base64 string. In order to provide specific header data when submitting the request, header data may be passed in sHeader . Header Options Content-Length and Host are determined by the function and must not be passed.

    sHeader: "Content-Type: text/xml; charset=UTF-8"

    • sURL - URI string

      The URL string is a Uniform Resource Identifier (URI) with the following syntax:

      [scheme:][//host[:port]/]path[?query][#fragment]

      At least, a path is required for a valid URI.

    • cBinary - Binary data block handle

      Constant reference to a binary data block handle, which may contain binary data up to 2 GB.

    • sHeader - HTML message header

      Header options passed in the string have to be separated by new lines (\n). Header options have to be passed with option keyword and value separated by colon (:).

      Content-Type: text/xml

  4. to list
  5. Submitting data with authentication
    bool HTTP  :: PUT ( odaba::String &sURL, odaba::Binary &cBinary, odaba::String &sUser, odaba::String &sPassword )

    In order to provide authentication data according to basic RFC 2617 authentication, user name ( sUser ) and password ( sPassword ) have to be provided. The function creates authentication header data and posts the binary data passed in binary converted to a base64 string.

    • sURL - URI string

      The URL string is a Uniform Resource Identifier (URI) with the following syntax:

      [scheme:][//host[:port]/]path[?query][#fragment]

      At least, a path is required for a valid URI.

    • cBinary - Binary data block handle

      Constant reference to a binary data block handle, which may contain binary data up to 2 GB.

    • sUser - User name
    • sPassword - User's password
  6. to list
  7. Submitting data with default header
    bool HTTP  :: PUT ( odaba::String &sURL, odaba::String &sData )

    The function posts the message creating a default header, which may be displayed when creating the HTTP instance with bVerbose option set to true .

    • sURL - URI string

      The URL string is a Uniform Resource Identifier (URI) with the following syntax:

      [scheme:][//host[:port]/]path[?query][#fragment]

      At least, a path is required for a valid URI.

    • sData - Query string

      The way the query string is defined depends on the receiver (host) evaluating the query. Typically, queries are passed as XML queries.

  8. to list
  9. Submitting data with authentication
    bool HTTP  :: PUT ( odaba::String &sURL, odaba::String &sData, odaba::String &sUser, odaba::String &sPassword )

    In order to provide authentication data according to basic RFC 2617 authentication, user name ( sUser ) and password ( sPassword ) have to be provided. The function creates authentication header data and posts data passed in sData .

    • sURL - URI string

      The URL string is a Uniform Resource Identifier (URI) with the following syntax:

      [scheme:][//host[:port]/]path[?query][#fragment]

      At least, a path is required for a valid URI.

    • sData - Query string

      The way the query string is defined depends on the receiver (host) evaluating the query. Typically, queries are passed as XML queries.

    • sUser - User name
    • sPassword - User's password
  10. to list
  11. Submitting data with specific header data
    bool HTTP  :: PUT ( odaba::String &sURL, odaba::String &sData, odaba::String &sHeader )

    In order to provide specific header data when submitting the request, header data may be passed in sHeader . Header Options Content-Length and Host are determined by the function and must not be passed.

    sHeader: "Content-Type: text/xml; charset=UTF-8"

    • sURL - URI string

      The URL string is a Uniform Resource Identifier (URI) with the following syntax:

      [scheme:][//host[:port]/]path[?query][#fragment]

      At least, a path is required for a valid URI.

    • sData - Query string

      The way the query string is defined depends on the receiver (host) evaluating the query. Typically, queries are passed as XML queries.

    • sHeader - HTML message header

      Header options passed in the string have to be separated by new lines (\n). Header options have to be passed with option keyword and value separated by colon (:).

      Content-Type: text/xml

  12. to list