examples: annotate examples
[nit.git] / lib / nitcorn / examples / src / htcpcp_server.nit
index 6614533..d58dcca 100644 (file)
@@ -17,7 +17,7 @@
 # Hyper Text Coffee Pot Control Protocol
 
 # A server that implements HTCPCP. At the moment there are no additions.
-module htcpcp_server
+module htcpcp_server is example
 
 import nitcorn
 
@@ -34,10 +34,9 @@ class HTCPCPAction
        redef fun answer(http_request, turi) do
                var message: String
                var method = http_request.method
-               var headers = http_request.header
                var response: HttpResponse
 
-               if is_teapot == true then
+               if is_teapot then
                        response = new HttpResponse(418)
                        response.body = "I'm a teapot!\n"
                        response.header["Content-Type"] = "text"