Explorer

html-ui.handle

description
type
Fn(editable: Boolean, request: @http.request) -> @definy.service-io
expression
fn(editable$0, request$1) =>
  let config$2 = {editable: $0, request: $1};
  let language$990 = @html-ui.request-language(request: $1);
  match @core.equal(left: @http.method-text(method: $1.method), right: "POST") {
    true =>
      @definy.rpc-respond(
        cbor: @definy.request-wants-cbor(request: $1),
        io: @html-ui.handle-api(language: $990, config: $2, path: @http.path(request: $1), body: @html-ui.api-body(request: $1))
      ),
    false =>
      @html-ui.handle-request(language: $990, config: $2, path: @http.path(request: $1), query: @http.query(request: $1))
  }
visibility
public
html-ui.handle (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: AR50uglUwoAzVDDHuzAxtGAawbLDZ3Q4dZvQMesDZOs
content hash: Py3X5D27WDElhiFiYD5yX_7PHTSGY6drezi3WsAZV8c