src/Tools/WWW_Find/echo.ML
changeset 56738 13b0fc4ece42
parent 56737 e4f363e16bdc
child 56739 0d56854096ba
equal deleted inserted replaced
56737:e4f363e16bdc 56738:13b0fc4ece42
     1 (*  Title:      Tools/WWW_Find/echo.ML
       
     2     Author:     Timothy Bourke, NICTA
       
     3 
       
     4 Install simple echo server.
       
     5 *)
       
     6 
       
     7 local
       
     8 fun echo (req, content, send) =
       
     9   (send (ScgiReq.show req);
       
    10    send "--payload-----\n";
       
    11    send (Byte.bytesToString content);
       
    12    send "\n--------------\n")
       
    13 in
       
    14 val () = ScgiServer.register ("echo", SOME Mime.plain, echo);
       
    15 end;
       
    16