Normally there is no need to create a new HostHttpServer
, instead
use the start
method of the host
instance.
HostHttpServer
R6Class
.
Note for developers: the general approach taken in developing this class is to mirror implementations in Node and Python to make it easier to port code between the languages and ensure consisten implementations.
The host to be served
The port to listen on. Default '127.0.0.1'
The port to listen on. Default 2000
Start the server
Stop the server
Handle a HTTP request
Route a HTTP request
Handle a request for a static file
Handle a request to call a host method
Generate an error response
Generate a 400 error
Generate a 401 error
Generate a 403 error
Generate a 404 error
Generate a 500 error
The address of the server
The port of the server
The URL of the server, or NULL
if not yet started