Params, queries and headers — RPC · Hono

Send everything a request carries through the typed client: a path parameter, a query value, a header the route's validator demands, and URLs and paths built from the same type with $url() and $path().

What you will learn

Read the theory for Params, queries and headers

All RPC lessons

All Hono courses

loading types…

What you'll learn

  • Pass path parameters and query values as strings under param and query, typed by the server's validators
  • Send a header a route validates under header, one every request carries with hc's headers option, and know what init overrides
  • Build an absolute URL with $url() and a path with $path() from the route's type