proc `$`(response: Response): string {...}{.raises: [ValueError], tags: [].}
-
Stringify response.
Source
Edit
proc initResponse(httpVersion: HttpVersion; code: HttpCode; headers = [
("Content-Type", "text/html; charset=UTF-8")].newHttpHeaders; body = ""): Response {...}{.
raises: [], tags: [].}
-
Initializes response.
Source
Edit
proc hasHeader(response: Response; key: string): bool {...}{.inline, raises: [], tags: [].}
-
Returns true if key is in the response.
Source
Edit
proc setHeader(response: var Response; key, value: string) {...}{.inline, raises: [], tags: [].}
-
Sets the header values of the response.
Source
Edit
proc setHeader(response: var Response; key: string; value: sink seq[string]) {...}{.inline,
raises: [], tags: [].}
-
Sets the header values of the response.
Source
Edit
proc addHeader(response: var Response; key, value: string) {...}{.inline, raises: [KeyError],
tags: [].}
-
Adds header values to the existing HttpHeaders.
Source
Edit
proc setCookie(response: var Response; key, value: string; expires = "";
maxAge: Option[int] = none(int); domain = ""; path = ""; secure = false;
httpOnly = false; sameSite = Lax) {...}{.inline, raises: [KeyError], tags: [].}
-
Sets the cookie of response.
Source
Edit
proc setCookie(response: var Response; key, value: string; expires: DateTime | Time;
maxAge: Option[int] = none(int); domain = ""; path = ""; secure = false;
httpOnly = false; sameSite = Lax) {...}{.inline.}
-
Sets the cookie of response.
Source
Edit
proc deleteCookie(response: var Response; key: string; value = ""; path = ""; domain = "") {...}{.
inline, raises: [KeyError], tags: [TimeEffect].}
-
Source
Edit