Requests and responses — HTTP and REST · Foundations

What travels between a client and your server: a method, a path, a query string, headers and a body one way, and a status, headers and a body the other. Build a server that describes every request it receives.

What you will learn

Read the theory for Requests and responses

All HTTP and REST lessons

All Foundations courses

loading types…

What you'll learn

  • Name the parts of an HTTP request (method, path, query, headers, body) and of a response (status, headers, body)
  • Read each part of a request in Hono, and tell an absent header from an empty one
  • Set a response's headers and body, and see that a HEAD request gets the headers without the body