roUrlEvent

The roUrlTransfer component sends the roUrlEvent with the following methods:

Supported methods

GetInt() as Integer

Returns the type of event, which may be one of the following values:

Event TypeDescription
1transfer complete
2transfer started. Headers are available for suitable protocols. (Not currently implemented)

GetResponseCode() as Integer

Returns the protocol response code associated with this event. For a successful HTTP request this will be the HTTP status code 200. For unexpected errors the return value is negative. There are lots of possible negative errors from the CURL library but it's often best just to look at the text version via GetFailureReason().

The following table lists some of the potential errors (not all of them can be generated):

StatusNameDescription
-1CURLE_UNSUPPORTED_PROTOCOL
-2CURLE_FAILED_INIT
-3CURLE_URL_MALFORMAT
-4CURLE_NOT_BUILT_IN
-5CURLE_COULDNT_RESOLVE_PROXY
-6CURLE_COULDNT_RESOLVE_HOST
-7CURLE_COULDNT_CONNECT
-8CURLE_FTP_WEIRD_SERVER_REPLY
-9CURLE_REMOTE_ACCESS_DENIEDA service was denied by the server due to lack of access - when login fails this is not returned
-11CURLE_FTP_WEIRD_PASS_REPLY
-13CURLE_FTP_WEIRD_PASV_REPLY
-14CURLE_FTP_WEIRD_227_FORMAT
-15CURLE_FTP_CANT_GET_HOST
-16CURLE_HTTP2
-17CURLE_FTP_COULDNT_SET_TYPE
-18CURLE_PARTIAL_FILE
-19CURLE_FTP_COULDNT_RETR_FILE
-21CURLE_QUOTE_ERRORQuote command failure
-22CURLE_HTTP_RETURNED_ERROR
-23CURLE_WRITE_ERROR
-25CURLE_UPLOAD_FAILEDFailed upload "command"
-26CURLE_READ_ERRORCould open/read from file
-27CURLE_OUT_OF_MEMORY
-28CURLE_OPERATION_TIMEDOUTThe timeout time was reached
-30CURLE_FTP_PORT_FAILEDFTP PORT operation failed
-31CURLE_FTP_COULDNT_USE_RESTThe REST command failed
-33CURLE_RANGE_ERRORRANGE "command" didn't work
-34CURLE_HTTP_POST_ERROR
-35CURLE_SSL_CONNECT_ERRORWrong when connecting with SSL
-36CURLE_BAD_DOWNLOAD_RESUMECouldn't resume download
-37CURLE_FILE_COULDNT_READ_FILE
-38CURLE_LDAP_CANNOT_BIND
-39CURLE_LDAP_SEARCH_FAILED
-41CURLE_FUNCTION_NOT_FOUND
-42CURLE_ABORTED_BY_CALLBACK
-43CURLE_BAD_FUNCTION_ARGUMENT
-45CURLE_INTERFACE_FAILEDCURLOPT_INTERFACE failed
-47CURLE_TOO_MANY_REDIRECTSCatch endless re-direct loops
-48CURLE_UNKNOWN_TELNET_OPTIONUser specified an unknown option
-49CURLE_TELNET_OPTION_SYNTAXMalformed telnet option
-51CURLE_PEER_FAILED_VERIFICATIONPeer's certificate or fingerprint wasn't verified fine
-52CURLE_GOT_NOTHINGWhen this is a specific error
-53CURLE_SSL_ENGINE_NOTFOUNDSSL crypto engine not found
-54CURLE_SSL_ENGINE_SETFAILEDCan not set SSL crypto engine as default
-55CURLE_SEND_ERRORFailed sending network data
-56CURLE_RECV_ERRORFailure in receiving network data
-58CURLE_SSL_CERTPROBLEMProblem with the local certificate
-59CURLE_SSL_CIPHERCouldn't use specified cipher
-60CURLE_SSL_CACERTProblem with the CA cert (path?)
-61CURLE_BAD_CONTENT_ENCODINGUnrecognized transfer encoding
-62CURLE_LDAP_INVALID_URLInvalid LDAP URL
-63CURLE_FILESIZE_EXCEEDEDMaximum file size exceeded
-64CURLE_USE_SSL_FAILEDRequested FTP SSL level failed
-65CURLE_SEND_FAIL_REWINDSending the data requires a rewind that failed
-66CURLE_SSL_ENGINE_INITFAILEDFailed to initialize ENGINE
-67CURLE_LOGIN_DENIEDUser, password or similar was not accepted and we failed to login
-68CURLE_TFTP_NOTFOUNDFile not found on server
-69CURLE_TFTP_PERMPermission problem on server
-70CURLE_REMOTE_DISK_FULLOut of disk space on server
-71CURLE_TFTP_ILLEGALIllegal TFTP operation
-72CURLE_TFTP_UNKNOWNIDUnknown transfer ID
-73CURLE_REMOTE_FILE_EXISTSFile already exists
-74CURLE_TFTP_NOSUCHUSERNo such user
-75CURLE_CONV_FAILEDConversion failed
-76CURLE_CONV_REQDCaller must register conversion callbacks using curl_easy_setopt options CURLOPT_CONV_FROM_NETWORK_FUNCTION, CURLOPT_CONV_TO_NETWORK_FUNCTION, and CURLOPT_CONV_FROM_UTF8_FUNCTION
-77CURLE_SSL_CACERT_BADFILECould not load CACERT file, missing or wrong format
-78CURLE_REMOTE_FILE_NOT_FOUNDRemote file not found
-79CURLE_SSHError from the SSH layer, somewhat generic so the error message will be of interest when this has happened
-80CURLE_SSL_SHUTDOWN_FAILEDFailed to shut down the SSL connection

GetFailureReason() as String

Returns a description of the failure that occurred.

GetString() as String

For transfer complete AsyncGetToString, AsyncPostFromString and AsnycPostFromFile requests this will be the actual response body from the server. This method returns the string associated with the event.

GetSourceIdentity() as Integer

Returns a magic number that can be matched with the value returned by the roUrlTransfer.GetIdentity() method to determine the source of the roUrlTransfer event.

GetResponseHeaders() as Object

Returns an roAssociativeArray containing all the headers returned by the server for appropriate protocols (such as HTTP). Headers are only returned when the status code is greater than or equal to 200 and less than 300

GetTargetIpAddress() as String

Returns the IP address of the destination.

GetResponseHeadersArray() as Object

This method returns an roArray of roAssociativeArrays, where each associative array contains a single header name/value pair. Use this function if you need access to duplicate headers, since GetResponseHeaders() returns only the last name/value pair for a given name. All headers are returned regardless of the status code