rust-web-server 17.24.0

An HTTP web framework and server for Rust supporting HTTP/1.1, HTTP/2, and HTTP/3. No third-party HTTP dependencies — parsing, routing, middleware, auth, WebSocket, SSE, caching, and tracing are all built in.
Documentation
[Read Me](https://github.com/bohdaq/rust-web-server/blob/main/README.md) > [Documentation](https://github.com/bohdaq/rust-web-server/tree/main/src/README.md)  > Header 

# Header 

Header module is designed to convert string to `header` struct and vice versa.

### High level HTTP header overview
Example HTTP header:

> Host: 127.0.0.1:7888


Header (Host: 127.0.0.1:7888) starts with new line and contains header name (Host) followed by `:` and header value (127.0.0.1:7888).

Header needs to be UTF-8 encoded and does not contain any extra [control characters](https://en.wikipedia.org/wiki/Control_character).

There are predefined list of headers to cover most use cases. 

### Usage
To parse string to [Header](https://github.com/bohdaq/rust-web-server/blob/main/src/header/mod.rs#L18), simply call [Header::parse](https://github.com/bohdaq/rust-web-server/blob/main/src/header/example/mod.rs#L10) method.

To convert header instance to string invoke [generate](https://github.com/bohdaq/rust-web-server/blob/main/src/header/example/mod.rs#L30) method.

#### Links
- [List of HTTP headers]https://github.com/bohdaq/rust-web-server/blob/main/src/header/mod.rs#L30

Previous topic | Current Topic | Next Topic
--- |---------------| ---
[Request]https://github.com/bohdaq/rust-web-server/tree/main/src/request | Header          | [Response]https://github.com/bohdaq/rust-web-server/tree/main/src/response