Rohttpserver – BrightSign Object Reference Manual (FW 5.1) User Manual

Page 200

Advertising
background image

192

roHttpServer

This object allows for processing of RESTful HTTP requests from remote URLs to the embedded web server of the
BrightSign player. Many of the requests are provided to the script as roHttpEvent objects for handling.

Object Creation: The roHttpServer object is created with an roAssociativeArray.

CreateObject("roHttpServer", parameters As roAssociativeArray)

Currently, the associative array can contain a single key:value pair:

port: The port number of the embedded web server


Interfaces:

ifHttpServer

,

ifSetMessagePort

,

ifGetMessagePort


The ifHttpServer interface provides the following:

GetFailureReason() As String: Yields additional useful information if an roHttpServer method fails.

AddGetFromString(parameters As roAssociativeArray) As Boolean: Causes any HTTP GET
requests for the specified URL path to be met directly with the contents of the "body" member of the parameter
associative array. The MIME type (and potentially the entire character set) should be specified if the request is
expected to come from a web browser. The request is handled entirely within the roHttpServer method; no events
are sent to the message port.

AddGetFromFile(parameters As roAssociativeArray) As Boolean: Causes any HTTP GET requests
for the specified URL path to be met directly from the specified file. You should always specify the MIME type (and
possibly the character set) if you expect the request to come from a web browser. The request is handled entirely
within the roHttpServer method; no events are sent to the message port.

Advertising