Frames
A frame in HTTP/2 is the smallest unit data representation. It contains:
- A frame Header that normally only contains the identifier of the stream that it belongs to.
The data content, which can have different formats depending on the kind of data that it contains. Most of the frames may contain a Padding block at the end of the frame, and it is used to obfuscate the length of the frame for security reasons. Here we have some types of frames:
- DATA: (type=0x0) Contains the payload of the requests or the responses.
HEADERS: (type=0x1) Equivalent to HTTP/1.x headers, it is used to open a stream and it basically contains a header block fragment, such as:
method: GET path: /index.html version: HTTP/2.0
- PRIORITY: (type=0x02) Specifies the sender advised priority of the stream.
- RST_STREAM (type=0x03) Sent for immediate termination of a stream purposes.
- SETTINGS: (type=0x04) Its purpose is to send the desired configuration of the connection that needs to be established (Enable Push...