HTTPHandler

This is the interface through which HTTP messages are delivered to application code. On the server, this will be HTTP Requests (GET, HEAD, DELETE, POST, etc) sent from a client. On the client, this will be the HTTP Responses coming back from the server. The protocol is largely symmetrical and the same interface definition is used, though what processing happens behind the interface will of course vary.

This interface delivers asynchronous events when receiving an HTTP message (called a Payload). Calls to these methods are made in the context of the HTTPSession actor so most of them should be passing data on to a processing actor.

Each HTTPSession must have a unique instance of the handler. The application code does not necessarily know when an HTTPSession is created, so the application must provide an instance of HandlerFactory that will be called at the appropriate time.

interface ref HTTPHandler

Public Functions

apply

fun ref apply(
  payload: Payload val)
: Any tag

Parameters

Returns


chunk

fun ref chunk(
  data: (String val | Array[U8 val] val))
: None val

Parameters

Returns


finished

fun ref finished()
: None val

Returns


cancelled

fun ref cancelled()
: None val

Returns


throttled

fun ref throttled()
: None val

Returns


unthrottled

fun ref unthrottled()
: None val

Returns


need_body

fun ref need_body()
: None val

Returns