Skip to main content

Requests & Responses

Headers, bodies, streaming, errors. The day-to-day stuff you'll actually touch.

In this section

  • Headers: why header order matters, setting custom ones, what each preset ships by default
  • JSON Bodies: sending and parsing JSON, the shortcuts and the gotchas
  • Form Data and Multipart: url-encoded and multipart/form-data, with file uploads
  • Streaming Responses: DoStream(), reading chunks, cookie jar parity
  • Error Handling: network errors vs real 5xx, and how to tell them apart