HTTP Headers and Body - JamesDansie/data-structures-and-algorithms GitHub Wiki

HTTP Headers and body

So where do parameters and header variables live anyways? They are in the HTTP request. Parameters can live in the path, but the header are hidden in the http request. The http request has a regular format;

which means we can store extra data in the headers. This can be useful for passing along little bits of information in our http requests and responses. There are three ways to pass data along in the http request;

  1. The query parameters - In the URL (usually /?key=value )
  2. Path Variables - In the URL (usually /key/value )
  3. Request Body - In the body of the http request.

References

  1. https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages