Function: TemperatureConversionCallback

CALL:

TemperatureConversionCallback(event)

DESCRIPTION:

Callback called by modelit.webserver.Server object for converting Celcius to Fahrenheit and vice versa. This example serves the HTML page to the client and uses JavaScript to update the components of the HTML page. The server only processes requests to calculate the conversion.

INPUT:

event modelit.webserver.HttpExchange
with the request data and methods to generate a response.

OUTPUT:

      No output, a response with a JSON object is return to the client.
 

EXAMPLE:

   server = modelit.web.server.Server(8081, @TemperatureConversionCallback).start() 
 
   % Open a webbrowser and type: http://localhost:8081/ in the address bar