Document asynchttpserver's respond template
This commit is contained in:
parent
7b4724ea27
commit
6830c65560
1 changed files with 1 additions and 1 deletions
|
|
@ -112,7 +112,7 @@ proc sendHeaders*(req: Request, headers: StringTableRef): Future[void] =
|
||||||
template respond*(req: Request, code: HttpCode,
|
template respond*(req: Request, code: HttpCode,
|
||||||
content: string, headers: StringTableRef = nil) =
|
content: string, headers: StringTableRef = nil) =
|
||||||
## Responds to the request with the specified ``HttpCode``, headers and
|
## Responds to the request with the specified ``HttpCode``, headers and
|
||||||
## content.
|
## content. This template returns a Future[void].
|
||||||
##
|
##
|
||||||
## This template will **not** close the client socket.
|
## This template will **not** close the client socket.
|
||||||
var msg = "HTTP/1.1 " & $code & "\c\L"
|
var msg = "HTTP/1.1 " & $code & "\c\L"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue