Player APIs (BrightScript & Ja...
...
Networking Objects
roUrlEvent
6 min
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 true false 71,321false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type the following error codes are generated by the system software, and are outside the range of curl events true false 79,220false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type 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