Player APIs (BrightScript & Ja...
...
Object Reference
Networking Objects
roUrlEvent
6min
this event is generated by the rourltransfer object ifint getint() as integer returns the type of event the following event types are currently defined 1 transfer complete 2 transfer started ifstring getstring() as string returns the string associated with the event for transfer complete asyncgettostring() , asyncpostfromstring() , and asyncpostfromfile() requests, this will be the actual response body from the server, truncated to 65,536 characters ifuserdata setuserdata(user data as object) as void sets the user data getuserdata() as object returns the user data that has previously been set via setuserdata() (on either the event or source object) it will return invalid if no data has been set ifsourceidentity getsourceidentity() as integer returns a unique number that can be matched with the value returned by rourltransfer getidentity() to determine where this event originated the ifsourceidentity interface has been deprecated we recommend using the ifuserdata interface instead ifurlevent getresponsecode() as integer returns the protocol response code associated with an event the following codes indicate success 200 successful http transfer 226 successful ftp transfer 0 successful local file transfer for unexpected errors, the return value is negative there are many possible negative errors from the curl library, but it is often best to look at the text version by calling getfailurereason() here are some potential errors not all of them can be generated by a brightsign player status name description 1 curle unsupported protocol 2 curle failed init 3 curle url malformat 5 curle couldnt resolve proxy 6 curle couldnt resolve host 7 curle couldnt connect 8 curle ftp weird server reply 9 curle remote access denied a service was denied by the server due to lack of access when login fails, this is not returned 11 curle ftp weird pass reply 13 curle ftp weird pasv reply 14 curle ftp weird 227 format 15 curle ftp cant get host 17 curle ftp couldnt set type 18 curle partial file 19 curle ftp couldnt retr file 21 curle quote error failed quote command 22 curle http returned error 23 curle write error 25 curle upload failed failed upload command 26 curle read error could not open/read from file 27 curle out of memory 28 curle operation timedout the timeout time was reached 30 curle ftp port failed ftp port operation failed 31 curle ftp couldnt use rest rest command failed 33 curle range error range command did not work 34 curle http post error 35 curle ssl connect error wrong when connecting with ssl 36 curle bad download resume could not resume download 37 curle file couldnt read file 38 curle ldap cannot bind 39 curle ldap search failed 41 curle function not found 42 curle aborted by callback 43 curle bad function argument 45 curle interface failed curlopt interface failed 47 curle too many redirects catch endless re direct loops 48 curle unknown telnet option user specified an unknown option 49 curle telnet option syntax malformed telnet option 51 curle peer failed verification peer's certificate or fingerprint wasn't verified correctly 52 curle got nothing when this is a specific error 53 curle ssl engine notfound ssl crypto engine not found 54 curle ssl engine setfailed cannot set ssl crypto engine as default 55 curle send error, failed sending network data 56 curle recv error failure in receiving network data 58 curle ssl certproblem problem with the local certificate 59 curle ssl cipher could not use specified cipher 60 curle ssl cacert problem with the ca cert (path?) 61 curle bad content encoding unrecognized transfer encoding 62 curle ldap invalid url invalid ldap url 63 curle filesize exceeded, maximum file size exceeded 64 curle use ssl failed, requested ftp ssl level failed 65 curle send fail rewind, sending the data requires a rewind that failed 66 curle ssl engine initfailed failed to initialize engine 67 curle login denied user, password, or similar field was not accepted and login failed 68 curle tftp notfound file not found on server 69 curle tftp perm permission problem on server 70 curle remote disk full out of disk space on server 71 curle tftp illegal illegal tftp operation 72 curle tftp unknownid unknown transfer id 73 curle remote file exists file already exists 74 curle tftp nosuchuser no such user 75 curle conv failed conversion failed 76 curle conv reqd caller must register conversion callbacks using the following url easy setopt options curlopt conv from network function curlopt conv to network function curlopt conv from utf8 function 77 curle ssl cacert badfile could not load cacert file, missing or wrong format 78 curle remote file not found remote file not found 79 curle ssh error from the ssh layer (this is somewhat generic, so the error message will be important when this occurs) 80 curle ssl shutdown failed failed to shut down the ssl connection the following error codes are generated by the system software, and are outside the range of curl events status name description 10001 error cancelled the transfer request has been cancelled because the rourltransfer instance is out of scope 10002 error exception the callback threw an exception getobject() as object returns the object associated with the event currently, this method can only return an object created in response to an rourltransfer asyncgettoobject request getfailurereason() as string returns a description of the failure that occurred getsourceidentity() as integer returns a unique number that can be matched with the value returned by rourltransfer getidentity() to determine where the event came from getresponseheaders() as roassociativearray returns an associative array containing all the headers returned by the server for appropriate protocols (such as http) gethash() as string the hash (digest) of the response body, as specified by the response pipe{hash } parameter of the rourltransfer asyncmethod() method getprefix() as string a number of bytes from the start of the response body the amount of bytes is specified with the response pipe{prefix capture } parameter of the rourltransfer asyncmethod() method