http-type 4.31.0

A library providing essential types for HTTP, including request bodies, response headers, and other core HTTP abstractions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::*;

/// Represents the components of a parsed HTTP URL.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct HttpUrlComponents {
    /// The URL scheme, such as "http" or "https".
    pub protocol: Protocol,
    /// The host part of the URL (e.g., "example.com").
    pub host: OptionString,
    /// The port number in the URL, if specified.
    pub port: OptionU16,
    /// The path in the URL (e.g., "/index.html").
    pub path: OptionString,
    /// The query string in the URL (e.g., "?a=1").
    pub query: OptionString,
    /// The fragment identifier (e.g., "#section").
    pub fragment: OptionString,
}