The roUrlTransfer component sends the roUrlEvent with the following methods:
GetInt() as Integer
Returns the type of event. The following event types are currently defined:
transfer 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().
Here are some potential errors. Not all of them can be generated.
a service was denied by the server due to lack of access - when login fails this is not returned.
quote command failure
failed upload "command"
could open/read from file
the timeout time was reached
FTP PORT operation failed
the REST command failed
RANGE "command" didn't work
wrong when connecting with SSL
couldn't resume download
catch endless re-direct loops
User specified an unknown option
Malformed telnet option
peer's certificate or fingerprint wasn't verified fine
when this is a specific error
SSL crypto engine not found
can not set SSL crypto engine as default
failed sending network data
failure in receiving network data
problem with the local certificate
couldn't use specified cipher
problem with the CA cert (path?)
Unrecognized transfer encoding
Invalid LDAP URL
Maximum file size exceeded
Requested FTP SSL level failed
Sending the data requires a rewind that failed
failed to initialise ENGINE
user, password or similar was not accepted and we failed to login
file not found on server
permission problem on server
out of disk space on server
Illegal TFTP operation
Unknown transfer ID
File already exists
No such user
caller 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
could not load CACERT file, missing or wrong format
remote file not found
error from the SSH layer, somewhat generic so the error message will be of interest when this has happened
Failed to shut down the SSL connection
GetFailureReason() as String
Returns a description of the failure that occurred.
GetString() as String
Return the string associated with the event. For transfer complete AsyncGetToString, AsyncPostFromString and AsyncPostFromFile requests this will be the actual response body from the server.
GetSourceIdentity() as Integer
Returns a magic number that can be matched with the value returned by roUrlTransfer.GetIdentity() to determine which roUrlTransfer this event came from.
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
Returns an roArray of roAssociativeArrays. 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.