html-ui.api-body
- description
- The body of POST /api/<name> as JSON text: a CBOR body (application/cbor, what the scripts of the pages send) is read with definy.rpc-request-json
- type
Fn(request: @http.request) -> String
- expression
fn(request$0) =>
match @definy.request-is-cbor(request: $0) {
false =>
@std.bytes-to-string(bytes: $0.body),
true =>
match @definy.rpc-request-json(request: $0) {
#json(json$1) =>
@definy.json-to-string(value: $1),
#invalid(_) =>
""
}
}- visibility
- public
html-ui.api-body (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: jRdV8Z2Xedc0d-t6HN_GEqFDoCMnlcdvuIrKhnnHen8
content hash: QMHr9VpG0VqCx91DKtbN4B234c4OFr5gIn1Emy_P59o