src/prologue/core/request

Source   Edit  

Procs

func addHeader(request: var Request; key, value: string) {.inline,
    ...raises: [KeyError], tags: [], forbids: [].}
Appends value to the existing key in request.headers. Source   Edit  
func getHeader(request: Request; key: string): seq[string] {.inline,
    ...raises: [KeyError], tags: [], forbids: [].}
Retrieves value of request.headers[key]. Source   Edit  
func getHeaderOrDefault(request: Request; key: string; default = @[""]): seq[
    string] {.inline, ...raises: [KeyError], tags: [], forbids: [].}
Retrieves value of request.headers[key]. Otherwise default will be returned. Source   Edit  
func hasHeader(request: Request; key: string): bool {.inline, ...raises: [],
    tags: [], forbids: [].}
Returns true if key is in request.headers. Source   Edit  
func setHeader(request: var Request; key, value: string) {.inline, ...raises: [],
    tags: [], forbids: [].}
Inserts a (key, value) pair into request.headers. Source   Edit  
func setHeader(request: var Request; key: string; value: seq[string]) {.inline,
    ...raises: [], tags: [], forbids: [].}
Inserts a (key, value) pair into request.headers. Source   Edit