SERVER / REQUEST BYTES

Receive the exact HTTP body

request source bytes binds the incoming body without JSON decoding or text conversion. The Rust runtime preserves its byte sequence for storage, hashing, functions, and byte responses.

1 / MENTAL MODEL

Bind bytes before using them

The name after request is the byte binding available to following server declarations. It belongs inside an HTTP handler and remains subject to the runtime request-size limit.

dowe
handler uploadArtifact
  request payload source:"bytes"
  file stored source:"write" root:env.STORAGE_ROOT path:req.params.hash data:payload sha256:req.params.hash
  return status:201 json:stored
Rule
What it means

No data

There are no records to display

2 / BYTE FLOW

Return a byte binding directly

A byte binding read from storage can be returned with an explicit content type. Dowe avoids a JSON or UTF-8 round trip across the complete handler.

dowe
handler downloadArtifact
  file artifact source:"read" root:env.STORAGE_ROOT path:req.params.hash
  return bytes:artifact contentType:"application/vnd.dowe.application"
Current support covers HTTP handlers in the native Dowe server runtime. Cloudflare edge targets do not receive this server-only host capability.