Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Web/Http

Final’s HTTP support covers client-side dialing and server-side listening:

  • Dialing — build an HttpReq, send it with an HttpDialer (or the httpDial helper), and read an HttpRes. Everyday HTTPS GET/POST against remote hosts.
  • Listening — bind an HttpListener, register ServeMux routes, spawn Pip handlers per route, and serve inbound requests.

You already know the pieces these APIs lean on:

  • Class methods with ^, property @ / !, and nested paths like t:.hostAddress.host! — Methods, Compound Path Syntax
  • Parking a request or dialer on ts for a short session of member ops — Writing Clean Final Code
  • StringKeyValueList for dial query parameters and headers (duplicate keys allowed) — StringKeyValueList
  • The modal result shape ( … -- result true \| err:s false ) — Writing Clean Final Code
  • Parsing a JSON response body with json> — Json. To send JSON, setBodyAsJsonString on HttpReq / HttpOutRes takes an already-rendered JSON string and sets Content-Type. Request and response bodies can also be TextRead / ByteRead streams — Dialing, Streams.
  • Pips and Pipes for listen-side concurrency — Threading
PageContents
Dialing (Get/Post)HttpAddress, HttpReq, HttpDialer, HttpRes, helpers, worked examples
Listening (Serving)HttpListener, HttpServeJob, ServeMux routes, path params, Pip-per-route handlers

Use help HttpReq / help HttpListener (and the other type names) in the TUI for the full member list and stack effects.