At-a-Glance Reference

HTTP, at a Glance

Read the requests, responses and headers that connect development and security.

Read a Simple Request

GET /guides HTTP/1.1
Host: example.com
Accept: text/html

This illustrative HTTP/1.1 request asks for a representation of /guides. Accept describes a response format the client can handle.

Read a Simple Response

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8

<h1>Guides</h1>

The status line describes the result. Headers supply metadata, and a blank line separates them from the body.

Recognise Common Status Codes

200  OK
301  Moved Permanently
401  Unauthorized
403  Forbidden
404  Not Found
429  Too Many Requests
500  Internal Server Error

A status code is one piece of evidence. For example, a 200 response from a login page does not by itself prove a successful sign-in.

Distinguish Two Content Headers

Accept: application/json
Content-Type: application/json

Accept expresses preferred response formats. Content-Type describes the media type of the body in the message carrying it.

Read a Session-Cookie Example

Set-Cookie: session=<server-generated-value>; Secure; HttpOnly; SameSite=Lax

Secure restricts transport to secure connections, HttpOnly blocks JavaScript access to the cookie, and SameSite controls cross-site sending. These flags are part of a wider session design.

HACKTRONIAN_CLI // COMMAND PALETTE
QUICK_EXEC: