diff options
author | Araq <rumpf_a@web.de> | 2014-08-27 23:42:51 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-08-27 23:42:51 +0200 |
commit | 11b69587554a99deb93ca2447ee3aeeacdb647c5 (patch) | |
tree | c4e580c4b084f85283f7159cb4772c93f9c08a5e /lib/pure/asynchttpserver.nim | |
parent | 15a7bcc89f43b36da1973b53db3b9e466f9f49f6 (diff) | |
download | Nim-11b69587554a99deb93ca2447ee3aeeacdb647c5.tar.gz |
big rename
Diffstat (limited to 'lib/pure/asynchttpserver.nim')
-rw-r--r-- | lib/pure/asynchttpserver.nim | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim index 26e3a2a7b..54d0b1b8e 100644 --- a/lib/pure/asynchttpserver.nim +++ b/lib/pure/asynchttpserver.nim @@ -1,6 +1,6 @@ # # -# Nimrod's Runtime Library +# Nim's Runtime Library # (c) Copyright 2014 Dominik Picheta # # See the file "copying.txt", included in this @@ -13,7 +13,7 @@ import strtabs, asyncnet, asyncdispatch, parseutils, uri, strutils type - TRequest* = object + Request* = object client*: PAsyncSocket # TODO: Separate this into a Response object? reqMethod*: string headers*: PStringTable @@ -22,10 +22,10 @@ type hostname*: string ## The hostname of the client that made the request. body*: string - PAsyncHttpServer* = ref object + AsyncHttpServer* = ref object socket: PAsyncSocket - THttpCode* = enum + HttpCode* = enum Http200 = "200 OK", Http303 = "303 Moved", Http400 = "400 Bad Request", @@ -33,10 +33,13 @@ type Http500 = "500 Internal Server Error", Http502 = "502 Bad Gateway" - THttpVersion* = enum + HttpVersion* = enum HttpVer11, HttpVer10 +{.deprecated: [TRequest: Request, PAsyncHttpServer: AsyncHttpServer, + THttpCode: HttpCode, THttpVersion: HttpVersion].} + proc `==`*(protocol: tuple[orig: string, major, minor: int], ver: THttpVersion): bool = let major = |