C++ Native Functions: com.teracloud.streams.inet.http
- public rstring httpDelete(rstring url,list<rstring> extraHeaders, rstring user, rstring password, mutable int32 error)
-
HTTP DELETE on the given url, using the username and password, if present. It follows redirects. If there is an error, a non-zero is returned by error. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- url
-
the url to delete
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- user
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- error
-
the returned error code
- Returns
-
the received http message body
- public rstring httpDelete(rstring url,list<rstring> extraHeaders, rstring user, rstring password, mutable int32 error, int32 requestTimeout, int32 connectionTimeout)
-
HTTP DELETE on the given url, using the username and password, if present. It follows redirects. If there is an error, a non-zero is returned by error. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- url
-
the url to delete
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- user
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- error
-
the returned error code
- requestTimeout
-
This is the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. Default timeout is 0 (zero) which means it never times out.
- connectionTimeout
-
This is the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 120 seconds.
- Returns
-
the received http message body
- public rstring httpDelete(rstring url,list<rstring> extraHeaders, rstring user, rstring password, rstring certFile, rstring certType, rstring keyFile, rstring keyType, rstring keyPass, mutable int32 error, int32 requestTimeout, int32 connectionTimeout)
-
HTTP DELETE on the given url, using the username and password, if present and certificates. It follows redirects. If there is an error, a non-zero is returned by error. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html. Certificate/Key type of P12 requires libcurl to be compiled with OpenSSL.
- Parameters
-
- url
-
the url to delete
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- user
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- certFile
-
if this string is not empty, this is the absolute path to a certificate file sent to the server
- certType
-
if this string is not empty, this is the cert file type (PEM, P12)
- keyFile
-
if this string is not empty, this is the absolute path to a private key file to be sent to the server
- keyType
-
if this string is not empty, this is the key file type (PEM, P12)
- keyPass
-
if this string is not empty, this is the password for the private key
- error
-
the returned error code
- requestTimeout
-
This is the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. Default timeout is 0 (zero) which means it never times out.
- connectionTimeout
-
This is the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 120 seconds.
- Returns
-
the received http message body
- public rstring httpGet(rstring url,list<rstring> extraHeaders, rstring user, rstring password, mutable int32 error)
-
HTTP GET on the given url, using the username and password, if present. It follows redirects. If there is an error, a non-zero is returned by error. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- url
-
the url to get
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- user
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- error
-
the returned error code
- Returns
-
the received http message body
- public rstring httpGet(rstring url,list<rstring> extraHeaders, rstring user, rstring password, mutable int32 error, int32 requestTimeout, int32 connectionTimeout)
-
HTTP GET on the given url, using the username and password, if present. It follows redirects. If there is an error, a non-zero is returned by error. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- url
-
the url to get
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- user
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- error
-
the returned error code
- requestTimeout
-
This is the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. Default timeout is 0 (zero) which means it never times out.
- connectionTimeout
-
This is the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 120 seconds.
- Returns
-
the received http message body
- public rstring httpGet(rstring url,list<rstring> extraHeaders, rstring user, rstring password, mutable list<rstring> headers, mutable int32 error)
-
HTTP GET on the given url, using the username and password, if present. It follows redirects. Received header information are provided in headers parameter. If there is an error, a non-zero is returned by error. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- url
-
the url to get
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- user
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- headers
-
the returned header data
- error
-
the returned error code
- Returns
-
the received http message body
- public rstring httpGet(rstring url,list<rstring> extraHeaders, rstring user, rstring password, mutable list<rstring> headers, mutable int32 error, int32 requestTimeout, int32 connectionTimeout)
-
HTTP GET on the given url, using the username and password, if present. It follows redirects. Received header information are provided in headers parameter. If there is an error, a non-zero is returned by error. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- url
-
the url to get
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- user
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- headers
-
the returned header data
- error
-
the returned error code
- requestTimeout
-
This is the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. Default timeout is 0 (zero) which means it never times out.
- connectionTimeout
-
This is the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 120 seconds.
- Returns
-
the received http message body
- public rstring httpGet(rstring url,list<rstring> extraHeaders, rstring user, rstring password, rstring certFile, rstring certType, rstring keyFile, rstring keyType, rstring keyPass, mutable list<rstring> headers, mutable int32 error, int32 requestTimeout, int32 connectionTimeout)
-
HTTP GET on the given url, using the username and password, if present, and using certificates/private keys. It follows redirects. Received header information are provided in headers parameter. If there is an error, a non-zero is returned by error. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html. Note: Certificate and key file types of P12 are supported only if libcurl is compiled with OpenSSL (run curl --version to see which library is supported).
- Parameters
-
- url
-
the url to get
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- user
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- certFile
-
if this string is not empty, this is the absolute path to a certificate file sent to the server
- certType
-
if this string is not empty, this is the cert file type (PEM, P12)
- keyFile
-
if this string is not empty, this is the absolute path to a private key file to be sent to the server
- keyType
-
if this string is not empty, this is the key file type (PEM, P12)
- keyPass
-
if this string is not empty, this is the password for the private key and certificate file
- headers
-
the returned header data
- error
-
the returned error code
- requestTimeout
-
This is the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. Default timeout is 0 (zero) which means it never times out.
- connectionTimeout
-
This is the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 120 seconds.
- Returns
-
the received http message body
- public rstring httpPost(rstring data, rstring url, list<rstring> extraHeaders, rstring username, rstring password, mutable list<rstring> headers, mutable int32 error)
-
HTTP POST data to the given url using the username and password (if non-empty). Does not follow redirects. Headers are returned in the headers list. Error is set to non-zero if there is an error. The result of the POST is returned as an rstring. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- data
-
the content to post
- url
-
the url to post
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- username
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- headers
-
the returned header data
- error
-
the returned error code
- Returns
-
the received http message body
- public rstring httpPost(rstring data, rstring url, list<rstring> extraHeaders, rstring username, rstring password, mutable list<rstring> headers, mutable int32 error, int32 requestTimeout, int32 connectionTimeout)
-
HTTP POST data to the given url using the username and password (if non-empty). Does not follow redirects. Headers are returned in the headers list. Error is set to non-zero if there is an error. The result of the POST is returned as an rstring. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- data
-
the content to post
- url
-
the url to post
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- username
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- headers
-
the returned header data
- error
-
the returned error code
- requestTimeout
-
This is the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. Default timeout is 0 (zero) which means it never times out.
- connectionTimeout
-
This is the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 120 seconds.
- Returns
-
the received http message body
- public rstring httpPost(rstring data, rstring url, list<rstring> extraHeaders, rstring username, rstring password, rstring certFile, rstring certType, rstring keyFile, rstring keyType, rstring keyPass, mutable list<rstring> headers, mutable int32 error, int32 requestTimeout, int32 connectionTimeout)
-
HTTP POST data to the given url using the username and password (if non-empty). Uses certificates and private key for SSL. Does not follow redirects. Headers are returned in the headers list. Error is set to non-zero if there is an error. The result of the POST is returned as an rstring. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- data
-
the content to post
- url
-
the url to post
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- username
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- certFile
-
if this string is not empty, this is the absolute path to a certificate file sent to the server
- certType
-
if this string is not empty, this is the cert file type (PEM, P12)
- keyFile
-
if this string is not empty, this is the absolute path to a private key file to be sent to the server
- keyType
-
if this string is not empty, this is the key file type (PEM, P12)
- keyPass
-
if this string is not empty, this is the password for the private key
- headers
-
the returned header data
- error
-
the returned error code
- requestTimeout
-
This is the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. Default timeout is 0 (zero) which means it never times out.
- connectionTimeout
-
This is the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 120 seconds.
- Returns
-
the received http message body
- public rstring httpPut(rstring data, rstring url, list<rstring> extraHeaders, rstring username, rstring password, mutable list<rstring> headers, mutable int32 error)
-
HTTP PUT data to the given url using the username and password given if not empty. Does not follow redirects. Headers are returned in the headers list, error is set to a non-zero if there is an error, and the result of the PUT is returned in the rstring. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- data
-
the content to put
- url
-
the url to put
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- username
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- headers
-
the returned header data
- error
-
the returned error code
- Returns
-
the received http message body
- public rstring httpPut(rstring data, rstring url, list<rstring> extraHeaders, rstring username, rstring password, mutable list<rstring> headers, mutable int32 error, int32 requestTimeout, int32 connectionTimeout)
-
HTTP PUT data to the given url using the username and password given if not empty. Does not follow redirects. Headers are returned in the headers list, error is set to a non-zero if there is an error, and the result of the PUT is returned in the rstring. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- data
-
the content to put
- url
-
the url to put
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- username
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- headers
-
the returned header data
- error
-
the returned error code
- requestTimeout
-
This is the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. Default timeout is 0 (zero) which means it never times out.
- connectionTimeout
-
This is the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 120 seconds.
- Returns
-
the received http message body
- public rstring httpPut(rstring data, rstring url, list<rstring> extraHeaders, rstring username, rstring password, rstring certFile, rstring certType, rstring keyFile, rstring keyType, rstring keyPass, mutable list<rstring> headers, mutable int32 error, int32 requestTimeout, int32 connectionTimeout)
-
HTTP PUT data to the given url using the username and password given if not empty. Does not follow redirects. Headers are returned in the headers list, error is set to a non-zero if there is an error, and the result of the PUT is returned in the rstring. Errorcodes see in https://curl.haxx.se/libcurl/c/libcurl-errors.html
- Parameters
-
- data
-
the content to put
- url
-
the url to put
- extraHeaders
-
if this list is not emtpy, the list is passed to the server as HTTP Headers
- username
-
if this string is not empty, this user name is passed to to the server
- password
-
if this string is not empty, this password is passed to the server
- certFile
-
if this string is not empty, this is the absolute path to a certificate file sent to the server
- certType
-
if this string is not empty, this is the cert file type (PEM, P12)
- keyFile
-
if this string is not empty, this is the absolute path to a private key file to be sent to the server
- keyType
-
if this string is not empty, this is the key file type (PEM, P12)
- keyPass
-
if this string is not empty, this is the password for the private key
- headers
-
the returned header data
- error
-
the returned error code
- requestTimeout
-
This is the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. Default timeout is 0 (zero) which means it never times out.
- connectionTimeout
-
This is the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 120 seconds.
- Returns
-
the received http message body
- public rstring urlDecode(rstring decode)
-
Decode a URL encoded rstring.
- public rstring urlEncode(rstring raw)
-
URL encode the given rstring.