src/Tools/WWW_Find/echo.ML
author traytel
Sun, 09 Mar 2014 21:40:41 +0100
changeset 56012 158dc03db8be
parent 33823 24090eae50b6
permissions -rw-r--r--
made typedef for the type of the bound optional (size-based)

(*  Title:      Tools/WWW_Find/echo.ML
    Author:     Timothy Bourke, NICTA

Install simple echo server.
*)

local
fun echo (req, content, send) =
  (send (ScgiReq.show req);
   send "--payload-----\n";
   send (Byte.bytesToString content);
   send "\n--------------\n")
in
val () = ScgiServer.register ("echo", SOME Mime.plain, echo);
end;