proc body(ctx: Context): string {....raises: [KeyError, ValueError], tags: [].}
Gets the request body from the request Returns an empty string if the user sent no body
Source
Edit
proc hasBody(ctx: Context): bool {....raises: [KeyError, ValueError], tags: [].}
Returns true if the request has a body
Source
Edit
proc httpMethod(ctx: Context): HttpMethod {....raises: [], tags: [].}
Source
Edit
proc json(ctx: Context): JsonNode {....raises: [IOError, OSError, JsonParsingError,
ValueError, Exception, KeyError], tags: [ReadIOEffect, WriteIOEffect].}
Parses JSON from the requests body and returns that
Source
Edit
proc json[T](ctx: Context; to: typedesc[T]): T
Parses JSON from the requests body and then converts it into T
Source
Edit
proc optBody(ctx: Context): Option[string] {....raises: [KeyError, ValueError],
tags: [].}
Returns the request body from the request. Not really that useful but exists if you want to use it
Source
Edit