gralha-http-core
Search uses release 0.1.0.0 · 61 definitions
Definitions (61)
- def whenOne of two computations, run on c; only the chosen one runs.
- def cut.goThe text before the first sep and the text after it, or None without sep.
- def cut
- def before.cut
- def beforeThe text before sep, or all of it without sep.
- def after.cut
- def afterThe text after sep, or "" without sep.
- def utf8.width
- def utf8.count
- def utf8.lengthThe bytes a text takes in UTF-8, as Content-Length counts them.
- def utf8.pushA character's UTF-8 bytes, prepended to acc in reverse.
- def utf8.needDecoding reads a byte at a time: need is the continuation bytes still owed and code the bits so far.
- def utf8.code
- def utf8.emit
- def utf8.decode.go
- def utf8.decode
- def hex.digit
- def hex.is_digit
- def url.bytes
- def url.decodeA url component with %XX escapes and + (a space, as forms send it) decoded; the bytes read as UTF-8.
- def target.pathA target's path: the part before ?.
- def target.queryA target's query: the part after ?, or "".
- def query.find
- def query.getThe first value of a query parameter, decoded, e.g.
- type Header
- def header.findThe value of the first header named name, any case.
- def header.get
- def header.has
- def header.line
- def header.parseHeader lines, "Name: value" each; a line with no colon is skipped.
- def header.text
- def digits
- def numberA decimal number made of digits only, as Content-Length is.
- def number.or_zero
- def content.lengthThe Content-Length a header list declares, or 0.
- type Request
- def request.line
- def request.head
- def request.cut
- def request.parseA request: "METHOD target HTTP/x.y", header lines, a blank line, the body (all that follows it).
- def request.complete.cut
- def request.completeWhether text holds a whole request: its head ended, and as many body bytes as its Content-Length (none without one).
- def request.method
- def request.target
- def request.path
- def request.body
- def request.headerA header of the request, any case.
- def request.queryA query parameter of the request's target, decoded.
- def request.isWhether the request is method on path, e.g.
- type Response
- def reasonThe reason phrase of a status code, or "" for one not listed.
- def responseA response with a status, a Content-Type and a body.
- def okA 200 response with a Content-Type and a body.
- def statusA plain-text response with the status's reason phrase as its body.
- def response.withThe response with one more header, after the ones it has.
- def response.status
- def headThe status line and the header lines, up to the blank line: what a server sends before a body it writes itself.
- def length.with
- def response.textThe response as sent: its head, with a Content-Length counted in UTF-8 bytes after its own headers (unless it has one), then its body.
- law ok_is_200
- law with_keeps_status