Explorer

definy.http-body-text

description
The HTTP body as text (JSON is written with definy.json-to-string, Base64 is left as it is)
type
Fn(body: @definy.http-body) -> String
expression
fn(body$0) =>
  match $0 {
    #empty(_) =>
      "",
    #text(text$1) =>
      $1,
    #json(json$2) =>
      @definy.json-to-string(value: $2),
    #base64(base64$3) =>
      $3,
    #bytes(bytes$4) =>
      @std.bytes-to-string(bytes: $4)
  }
visibility
public
definy.http-body-text (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: QeLet7ECWLAND59wTT-QXkVGXIogWfzu-rAOQbfUGVM
content hash: -Akme86Ahr5c7edKm79xzni63kc7AmUdE0vGVt4f8Fk