examples: annotate examples
[nit.git] / lib / nitcorn / http_response.nit
index 08d2968..ec83289 100644 (file)
 # Provides the `HttpResponse` class and `http_status_codes`
 module http_response
 
+import serialization
+
 # A response to send over HTTP
 class HttpResponse
+       serialize
 
        # HTTP protocol version
        var http_version = "HTTP/1.0" is writable
@@ -46,7 +49,7 @@ class HttpResponse
                # Set the content length if not already set
                if not header.keys.has("Content-Length") then
                        # Size of the body
-                       var len = body.bytelen
+                       var len = body.byte_length
 
                        # Size of included files
                        for path in files do