How To‎ > ‎

Evaluator Semantics

To make an evaluator request, a WebIDE agent sends a POST request to an evaluator, using the Content-Type "application/x-www-form-urlencoded", where the bytes in the POST are obtained by applying the urlencoding transformation to the byte string:

request=<string representation of EvalRequest>

That is, the bytes r e q u e s t = and then the encoding of the EvalRequest.

An EvalRequest is a JSON object matching this (informal) schema:

EvalRequest = 
obj[field("id",string),
    field("args",obj[zeroOrMoreFields(anyName,string)]),
    field("textfields",obj[zeroOrMoreFields(anyName,string)])]

In response, the evaluator responds with a 200 (ok) response, using the "text/html" mime type, and the JSON byte representation indicated by this informal schema:

EvalResponse = 
or[obj[field("status","success")],
   obj[field("status","failure"),field("message",htmlMessage)],
   obj[field("status","serverfail",field("message",string))],
   obj[field("status","callerfail"),field("message",string)]]
Here is an example evaluator written in PHP.
TBD

Here is an example evaluator written in Racket.
TBD
Comments