Expand description
Serialize and parse HTTP/1.x requests and responses to/from wire format bytes.
This crate provides encoding and decoding for HTTP/1.0 and HTTP/1.1 messages.
§Implementation Details
This crate leverages the hyper library for reliable and specification-compliant HTTP serialization.
Because hyper is asynchronous, the synchronous encoding APIs provided by this crate
internally create a temporary, single-threaded Tokio runtime to drive the serialization.
If you are already operating within an async context, you should prefer the _async
variants (e.g., WireEncodeAsync) to avoid the overhead of creating a nested runtime.
§Encoding
Use the WireEncode trait to convert HTTP messages to their wire format (synchronously):
Modules§
Structs§
- Header
- Represents a parsed header.
Enums§
- Wire
Error - Errors that can occur during HTTP wire format encoding.
Traits§
- Wire
Decode - Decode HTTP messages from raw bytes.
- Wire
Encode - Encode HTTP messages to their wire format bytes (synchronous version).
- Wire
Encode Async - Encode HTTP messages to their wire format bytes (async version).