http11

    Sans I/O HTTP/1.1 parser and encoder for MoonBit

    Download zip
    Author
    Version
    0.1.2
    License
    Apache-2.0
    Last updated
    6 hours ago
    Downloads
    174

    Dependencies

    #f4ah6o/http11

    MoonBit で実装された Sans I/O な HTTP/1.1 パーサー・エンコーダーライブラリ。

    #概要

    本ライブラリは shiguredo/http11-rs を MoonBit に移植したものです。Sans I/O 設計により、I/O 処理を完全に分離しているため、任意のトランスポート(TCP、TLS、WebSocket 等)で使用できます。

    • 依存ライブラリなし: MoonBit 標準ライブラリのみで動作
    • DoS 攻撃対策: デコーダーリミット機能でリソース枯渇攻撃を防御
    • HTTP/1.1 準拠: Content-Length および chunked 転送エンコーディングに対応

    #モジュール構成

    #コアモジュール

    ファイル説明
    error.mbtHttpError enum - パースエラーの種類
    limits.mbtDecoderLimits struct - デコーダー制限値
    request.mbtRequest struct - HTTP リクエスト表現
    response.mbtResponse struct - HTTP レスポンス表現
    encoder.mbtリクエスト/レスポンスのエンコード関数
    decoder.mbtRequestDecoder, ResponseDecoder - Sans I/O デコーダー

    #URI / URL

    ファイル説明
    uri.mbtUri struct - URI パース(RFC 3986)、パーセントエンコード/デコード

    #HTTP ヘッダー

    ファイル説明
    host.mbtHost struct - Host ヘッダー(RFC 9110)
    expect.mbtExpect struct - Expect ヘッダー(RFC 9110)
    trailer.mbtTrailer struct - Trailer ヘッダー(RFC 9112)
    upgrade.mbtUpgrade struct - Upgrade ヘッダー(RFC 9110)
    vary.mbtVary struct - Vary ヘッダー(RFC 9110)
    range.mbtRange, ContentRange, AcceptRanges - Range 関連ヘッダー(RFC 9110)

    #コンテント関連ヘッダー

    ファイル説明
    content_type.mbtContentType struct - Content-Type ヘッダー(RFC 9110)
    content_encoding.mbtContentEncoding struct - Content-Encoding ヘッダー(RFC 9110)
    content_disposition.mbtContentDisposition struct - Content-Disposition ヘッダー(RFC 6266)
    content_language.mbtContentLanguage struct - Content-Language ヘッダー(RFC 9110)
    content_location.mbtContentLocation struct - Content-Location ヘッダー(RFC 9110)

    #キャッシュ / 認証

    ファイル説明
    etag.mbtEntityTag, ETagList - ETag 関連(RFC 9110)
    cache.mbtCacheControl, Age, Expires - キャッシュ制御(RFC 9111)
    conditional.mbtIfMatch, IfNoneMatch, IfModifiedSince など - 条件付きリクエスト(RFC 9110)
    digest_fields.mbtContentDigest, ReprDigest, WantContentDigest など - ダイジェストフィールド(RFC 9530)

    #認証 / クッキー / 受入

    ファイル説明
    auth.mbtBasicAuth, DigestAuth, BearerToken - HTTP 認証(RFC 7617, 7616, 6750)
    cookie.mbtCookie, SetCookie - Cookie / Set-Cookie ヘッダー(RFC 6265)
    accept.mbtAccept, AcceptCharset, AcceptEncoding, AcceptLanguage - コンテントネゴシエーション(RFC 9110)

    #日付

    ファイル説明
    date.mbtHttpDate struct - HTTP-date パース(IMF-fixdate, RFC 850, ANSI C asctime)

    #エラー型

    ///|
    pub enum HttpError {
    InvalidData(String) // 不正なデータ
    BufferOverflow(Int, Int) // (size, limit)
    TooManyHeaders(Int, Int) // (count, limit)
    HeaderLineTooLong(Int, Int) // (size, limit)
    BodyTooLarge(Int, Int) // (size, limit)
    UnexpectedEof // 予期しない EOF
    InvalidHeaderValue // 不正なヘッダー値
    InvalidStatusCode // 不正なステータスコード
    InvalidChunkSize // 不正なチャンクサイズ
    }

    #デコーダーリミット

    ///|
    pub struct DecoderLimits {
    max_buffer_size : Int // デフォルト: 65536
    max_headers_count : Int // デフォルト: 100
    max_header_line_size : Int // デフォルト: 8192
    max_body_size : Int // デフォルト: 10485760 (10MB)
    }

    // デフォルトリミットで作成

    ///|
    let decoder = RequestDecoder::new()

    // カスタムリミットで作成

    ///|
    let limits = {
    max_buffer_size: 32768,
    max_headers_count: 50,
    max_header_line_size: 4096,
    max_body_size: 5242880,
    }

    ///|
    let decoder = RequestDecoder::with_limits(limits)

    // 無制限(テスト用途)

    ///|
    let decoder = RequestDecoder::with_limits(DecoderLimits::unlimited())

    #リクエスト

    #作成とエンコード

    // 基本的なリクエスト作成

    ///|
    let req = Request::new("GET", "/test")
    .header("Host", "example.com")
    .header("Connection", "keep-alive")

    // ボディ付きリクエスト

    ///|
    let req = Request::new("POST", "/api")
    .header("Content-Type", "application/json")
    .body("{\"key\":\"value\"}".to_bytes())

    // バージョン指定

    ///|
    let req = Request::with_version("GET", "/", "HTTP/1.0")

    // エンコード

    ///|
    let encoded = encode_request(req)
    // GET /test HTTP/1.1\r\nHost: example.com\r\nConnection: keep-alive\r\n\r\n

    #ヘルパーメソッド

    req.http_method() // "GET"
    req.get_header("Host") // Some("example.com")
    req.has_header("Host") // true
    req.is_keep_alive() // true
    req.content_length() // Some(123)
    req.is_chunked() // false

    #レスポンス

    #作成とエンコード

    // 基本的なレスポンス作成

    ///|
    let resp = Response::new(200, "OK")
    .header("Content-Type", "text/plain")
    .header("Content-Length", "5")

    // ボディ付きレスポンス

    ///|
    let resp = Response::new(404, "Not Found")
    .header("Content-Type", "text/html")
    .body("<h1>Not Found</h1>".to_bytes())

    // エンコード

    ///|
    let encoded = encode_response(resp)
    // HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 5\r\n\r\n

    #ステータスチェック

    resp.is_success() // 200-299
    resp.is_redirect() // 300-399
    resp.is_client_error() // 400-499
    resp.is_server_error() // 500-599

    #デコーダー(Sans I/O)

    #リクエストデコード

    let decoder = RequestDecoder::new()

    // データをフィード
    decoder.feed(data)?

    // デコード試行
    match decoder.decode() {
    Ok(Some(request)) => // リクエスト完了
    // request.http_method, request.uri, request.headers, request.body
    Ok(None) => // データが不十分 - 更にデータを feed して再試行
    Err(e) => // エラー処理
    }

    // デコーダーをリセットして次のリクエストに備える
    decoder.reset()

    // 未処理のデータを取得
    let remaining = decoder.remaining()

    #レスポンスデコード

    let decoder = ResponseDecoder::new()

    decoder.feed(data)?
    match decoder.decode() {
    Ok(Some(response)) => // レスポンス完了
    // response.status_code, response.reason_phrase, response.headers, response.body
    Ok(None) => // データが不十分
    Err(e) => // エラー処理
    }

    #URI パース(RFC 3986)

    // URI パース

    ///|
    let uri = Uri::parse("https://example.com:8080/path?query=value#fragment")

    // アクセサー
    uri.scheme() // Some("https")
    uri.host() // Some("example.com")
    uri.port() // Some(8080)
    uri.path() // "/path"
    uri.query() // Some("query=value")
    uri.fragment() // Some("fragment")
    uri.origin_form() // "/path?query=value"

    #ヘッダーパース

    #Host ヘッダー

    let host = Host::parse("example.com:8080")
    host.host() // "example.com"
    host.port() // Some(8080)

    #Content-Type ヘッダー

    let ct = ContentType::parse("application/json; charset=utf-8")
    ct.media_type() // "application"
    ct.subtype() // "json"
    ct.mime_type() // "application/json"
    ct.charset() // Some("utf-8")
    ct.is_json() // true

    // Cookie ヘッダー

    ///|
    let cookies = Cookie::parse("name1=value1; name2=value2")

    // Set-Cookie ヘッダー

    ///|
    let set_cookie = SetCookie::new("session", "abc123")
    .with_domain("example.com")
    .with_path("/")
    .with_secure(true)
    .with_http_only(true)

    #認証

    // Basic 認証

    ///|
    let auth = BasicAuth::new("username", "password")

    ///|
    let header_value = auth.to_header_value() // "Basic base64(...)"

    ///|
    let parsed = BasicAuth::parse(header_value)

    // Bearer トークン

    ///|
    let token = BearerToken::parse("Bearer abc123")

    #ETag

    // ETag パース
    let etag = EntityTag::parse("W/\"abc123\"")
    etag.is_weak() // true
    etag.tag() // "abc123"

    // ETag リスト
    let etags = parse_etag_list("*") // Any
    etags.is_any() // true

    #Range

    // Range ヘッダー
    let range = Range::parse("bytes=0-499")
    range.unit() // "bytes"
    range.ranges() // [Range(0UL, 499UL)]

    // Content-Range ヘッダー
    let cr = ContentRange::new_bytes(0UL, 499UL, Some(1000UL))
    cr.to_string() // "bytes 0-499/1000"

    #Chunked 転送エンコーディング

    // チャンクエンコード

    ///|
    let chunk1 = "Hello, ".to_bytes()

    ///|
    let chunk2 = "world!".to_bytes()

    ///|
    let encoded = encode_chunks([chunk1, chunk2])
    // 7\r\nHello, \r\n6\r\nworld!\r\n0\r\n\r\n

    // 単一チャンク

    ///|
    let encoded = encode_chunk("data".to_bytes())
    // 4\r\ndata\r\n

    #サンプル

    本ライブラリには3つの実行可能なサンプルプログラムが含まれています。

    #実行方法

    # 基本例 moon run src/cmd/main # HTTP クライアント moon run src/cmd/client --target native # HTTP サーバー moon run src/cmd/server --target native

    #出力例

    ======================================== http11.mbt Example Program ======================================== 1. GET Request Example --- Encoded GET request: GET /api/users HTTP/1.1\r\n Host: example.com\r\n Connection: keep-alive\r\n Accept: application/json\r\n \r\n 2. POST Request with Body Example --- Encoded POST request: POST /api/users HTTP/1.1\r\n Host: example.com\r\n Content-Type: application/json\r\n \r\n {"name":"Alice","age":30} 3. Response Example --- Encoded response: HTTP/1.1 200 OK\r\n Content-Type: text/plain\r\n Content-Length: 13\r\n \r\n Hello, World! 4. Chunked Transfer Encoding Example --- Encoded chunked data: 7\r\n Hello, \r\n 6\r\n world!\r\n 0\r\n \r\n 5. Request Decoder Example --- RequestDecoder API usage: let decoder = @lib.RequestDecoder::new() decoder.feed(data) // Feed raw bytes decoder.decode() // Try to decode a request Note: Decoder is intended for use with network I/O 6. Response Decoder Example --- ResponseDecoder API usage: let decoder = @lib.ResponseDecoder::new() decoder.feed(data) // Feed raw bytes decoder.decode() // Try to decode a response Note: Decoder is intended for use with network I/O ======================================== All examples completed successfully! ========================================

    #ライセンス

    Portions derived from https://github.com/shiguredo/http11-rs Copyright 2026 Shiguredo Inc. Licensed under the Apache License, Version 2.0

    本ライブラリ全体も Apache License 2.0 でライセンスされています。

    Accept

    pub(all) struct Accept {
    items : Array[MediaRange]
    } derive(Eq)

    Accept header (RFC 9110 Section 12.5)

    Accept::equal

    fn Accept::equal(Accept, Accept) -> Bool

    Accept::items

    fn Accept::items(self : Accept) -> Array[MediaRange]

    Accept::parse

    fn Accept::parse(input : String) -> Result[Accept, AcceptError]

    Accept::to_string

    fn Accept::to_string(self : Accept) -> String

    AcceptCharset

    pub(all) struct AcceptCharset {
    items : Array[CharsetRange]
    } derive(Eq)

    Accept-Charset header

    AcceptCharset::equal

    AcceptCharset::items

    AcceptCharset::parse

    fn AcceptCharset::parse(input : String) -> Result[AcceptCharset, AcceptError]

    AcceptEncoding

    pub(all) struct AcceptEncoding {
    items : Array[EncodingRange]
    } derive(Eq)

    Accept-Encoding header

    AcceptEncoding::equal

    AcceptEncoding::items

    AcceptEncoding::parse

    fn AcceptEncoding::parse(input : String) -> Result[AcceptEncoding, AcceptError]

    AcceptError

    pub(all) enum AcceptError {
    Empty
    InvalidFormat
    InvalidMediaRange
    InvalidToken
    InvalidParameter
    InvalidQValue
    InvalidLanguageTag
    } derive(Eq,
    Debug
    )

    Accept header parsing errors (RFC 9110 Section 12.5)
    impl Show for AcceptError

    AcceptError::equal

    fn AcceptError::equal(AcceptError, AcceptError) -> Bool

    AcceptError::output

    fn AcceptError::output(self : AcceptError, logger : &Logger) -> Unit

    AcceptError::to_string

    fn AcceptError::to_string(self : AcceptError) -> String

    AcceptLanguage

    pub(all) struct AcceptLanguage {
    items : Array[LanguageRange]
    } derive(Eq)

    Accept-Language header

    AcceptLanguage::equal

    AcceptLanguage::items

    AcceptLanguage::parse

    fn AcceptLanguage::parse(input : String) -> Result[AcceptLanguage, AcceptError]

    AcceptRanges

    pub(all) struct AcceptRanges {
    units : Array[String]
    } derive(Eq)

    Accept-Ranges header (RFC 9110 Section 14.3)

    AcceptRanges::accepts_bytes

    fn AcceptRanges::accepts_bytes(self : AcceptRanges) -> Bool

    AcceptRanges::bytes

    fn AcceptRanges::bytes() -> AcceptRanges

    AcceptRanges::equal

    AcceptRanges::is_none

    fn AcceptRanges::is_none(self : AcceptRanges) -> Bool

    AcceptRanges::none

    AcceptRanges::parse

    fn AcceptRanges::parse(input : String) -> Result[AcceptRanges, RangeError]

    AcceptRanges::to_string

    fn AcceptRanges::to_string(self : AcceptRanges) -> String

    AcceptRanges::units

    fn AcceptRanges::units(self : AcceptRanges) -> Array[String]

    Age

    pub(all) struct Age {
    seconds : Int
    } derive(Eq)

    Age header (RFC 9111 Section 5.1)

    Age::equal

    fn Age::equal(Age, Age) -> Bool

    Age::new

    fn Age::new(seconds : Int) -> Age

    Age::parse

    fn Age::parse(input : String) -> Result[Age, CacheError]

    Age::seconds

    fn Age::seconds(self : Age) -> Int

    Age::to_string

    fn Age::to_string(self : Age) -> String

    AuthChallenge

    pub(all) enum AuthChallenge {
    Basic(WwwAuthenticate)
    Digest(DigestChallenge)
    Bearer(BearerChallenge)
    } derive(Eq)

    WWW-Authenticate / Proxy-Authenticate challenge

    AuthChallenge::equal

    AuthChallenge::parse

    fn AuthChallenge::parse(input : String) -> Result[AuthChallenge, AuthError]

    AuthChallenge::to_header_value

    fn AuthChallenge::to_header_value(self : AuthChallenge) -> String

    AuthChallenge::to_string

    fn AuthChallenge::to_string(self : AuthChallenge) -> String

    AuthError

    pub(all) enum AuthError {
    Empty
    InvalidFormat
    NotBasicScheme
    NotDigestScheme
    NotBearerScheme
    Base64DecodeError
    Utf8Error
    MissingColon
    InvalidParameter
    MissingParameter
    InvalidToken
    } derive(Eq,
    Debug
    )

    Authentication error types
    impl Show for AuthError

    AuthError::equal

    fn AuthError::equal(AuthError, AuthError) -> Bool

    AuthError::output

    fn AuthError::output(self : AuthError, logger : &Logger) -> Unit

    AuthError::to_string

    fn AuthError::to_string(self : AuthError) -> String

    Authorization

    pub(all) enum Authorization {
    Basic(BasicAuth)
    Digest(DigestAuth)
    Bearer(BearerToken)
    } derive(Eq)

    Authorization header

    Authorization::equal

    Authorization::parse

    fn Authorization::parse(input : String) -> Result[Authorization, AuthError]

    Authorization::to_header_value

    fn Authorization::to_header_value(self : Authorization) -> String

    Authorization::to_string

    fn Authorization::to_string(self : Authorization) -> String

    BasicAuth

    pub(all) struct BasicAuth {
    username : String
    password : String
    } derive(Eq)

    Basic Authentication (RFC 7617)

    BasicAuth::equal

    fn BasicAuth::equal(BasicAuth, BasicAuth) -> Bool

    BasicAuth::new

    fn BasicAuth::new(username : String, password : String) -> BasicAuth

    BasicAuth::parse

    fn BasicAuth::parse(input : String) -> Result[BasicAuth, AuthError]

    BasicAuth::password

    fn BasicAuth::password(self : BasicAuth) -> String

    BasicAuth::to_header_value

    fn BasicAuth::to_header_value(self : BasicAuth) -> String

    BasicAuth::to_string

    fn BasicAuth::to_string(self : BasicAuth) -> String

    BasicAuth::username

    fn BasicAuth::username(self : BasicAuth) -> String

    BearerChallenge

    pub(all) struct BearerChallenge {
    params : Array[(String, String)]
    } derive(Eq)

    Bearer Challenge (WWW-Authenticate)

    BearerChallenge::equal

    BearerChallenge::param

    fn BearerChallenge::param(self : BearerChallenge, name : String) -> String?

    BearerChallenge::parse

    fn BearerChallenge::parse(input : String) -> Result[BearerChallenge, AuthError]

    BearerChallenge::to_header_value

    fn BearerChallenge::to_header_value(self : BearerChallenge) -> String

    BearerChallenge::to_string

    fn BearerChallenge::to_string(self : BearerChallenge) -> String

    BearerToken

    pub(all) struct BearerToken {
    token : String
    } derive(Eq)

    Bearer Token (RFC 6750)

    BearerToken::equal

    fn BearerToken::equal(BearerToken, BearerToken) -> Bool

    BearerToken::parse

    fn BearerToken::parse(input : String) -> Result[BearerToken, AuthError]

    BearerToken::to_header_value

    fn BearerToken::to_header_value(self : BearerToken) -> String

    BearerToken::to_string

    fn BearerToken::to_string(self : BearerToken) -> String

    BearerToken::token

    fn BearerToken::token(self : BearerToken) -> String

    CacheControl

    pub(all) struct CacheControl {
    max_age : Int?
    s_maxage : Int?
    max_stale : Int?
    min_fresh : Int?
    stale_while_revalidate : Int?
    stale_if_error : Int?
    no_cache : Bool
    no_store : Bool
    no_transform : Bool
    only_if_cached : Bool
    must_revalidate : Bool
    proxy_revalidate : Bool
    must_understand : Bool
    public : Bool
    private : Bool
    immutable : Bool
    } derive(Eq)

    Cache-Control header (RFC 9111 Section 5.2)

    CacheControl::equal

    CacheControl::is_cacheable

    fn CacheControl::is_cacheable(self : CacheControl) -> Bool

    CacheControl::is_immutable

    fn CacheControl::is_immutable(self : CacheControl) -> Bool

    CacheControl::is_must_revalidate

    fn CacheControl::is_must_revalidate(self : CacheControl) -> Bool

    CacheControl::is_must_understand

    fn CacheControl::is_must_understand(self : CacheControl) -> Bool

    CacheControl::is_no_cache

    fn CacheControl::is_no_cache(self : CacheControl) -> Bool

    CacheControl::is_no_store

    fn CacheControl::is_no_store(self : CacheControl) -> Bool

    CacheControl::is_no_transform

    fn CacheControl::is_no_transform(self : CacheControl) -> Bool

    CacheControl::is_only_if_cached

    fn CacheControl::is_only_if_cached(self : CacheControl) -> Bool

    CacheControl::is_private

    fn CacheControl::is_private(self : CacheControl) -> Bool

    CacheControl::is_proxy_revalidate

    fn CacheControl::is_proxy_revalidate(self : CacheControl) -> Bool

    CacheControl::is_public

    fn CacheControl::is_public(self : CacheControl) -> Bool

    CacheControl::max_age

    fn CacheControl::max_age(self : CacheControl) -> Int?

    CacheControl::max_stale

    fn CacheControl::max_stale(self : CacheControl) -> Int?

    CacheControl::min_fresh

    fn CacheControl::min_fresh(self : CacheControl) -> Int?

    CacheControl::new

    CacheControl::parse

    fn CacheControl::parse(input : String) -> Result[CacheControl, CacheError]

    CacheControl::s_maxage

    fn CacheControl::s_maxage(self : CacheControl) -> Int?

    CacheControl::stale_if_error

    fn CacheControl::stale_if_error(self : CacheControl) -> Int?

    CacheControl::stale_while_revalidate

    fn CacheControl::stale_while_revalidate(self : CacheControl) -> Int?

    CacheControl::to_string

    fn CacheControl::to_string(self : CacheControl) -> String

    CacheControl::with_immutable

    fn CacheControl::with_immutable(self : CacheControl) -> CacheControl

    CacheControl::with_max_age

    fn CacheControl::with_max_age(self : CacheControl, seconds : Int) -> CacheControl

    CacheControl::with_must_revalidate

    fn CacheControl::with_must_revalidate(self : CacheControl) -> CacheControl

    CacheControl::with_no_cache

    fn CacheControl::with_no_cache(self : CacheControl) -> CacheControl

    CacheControl::with_no_store

    fn CacheControl::with_no_store(self : CacheControl) -> CacheControl

    CacheControl::with_no_transform

    fn CacheControl::with_no_transform(self : CacheControl) -> CacheControl

    CacheControl::with_only_if_cached

    fn CacheControl::with_only_if_cached(self : CacheControl) -> CacheControl

    CacheControl::with_private

    fn CacheControl::with_private(self : CacheControl) -> CacheControl

    CacheControl::with_proxy_revalidate

    fn CacheControl::with_proxy_revalidate(self : CacheControl) -> CacheControl

    CacheControl::with_public

    fn CacheControl::with_public(self : CacheControl) -> CacheControl

    CacheControl::with_s_maxage

    fn CacheControl::with_s_maxage(self : CacheControl, seconds : Int) -> CacheControl

    CacheError

    pub(all) enum CacheError {
    Empty
    InvalidFormat
    InvalidNumber
    InvalidDate
    } derive(Eq,
    Debug
    )

    Cache header parsing errors
    impl Show for CacheError

    CacheError::equal

    fn CacheError::equal(CacheError, CacheError) -> Bool

    CacheError::output

    fn CacheError::output(self : CacheError, logger : &Logger) -> Unit

    CacheError::to_string

    fn CacheError::to_string(self : CacheError) -> String

    CharsetRange

    pub(all) struct CharsetRange {
    charset : String
    q : QValue
    } derive(Eq)

    Charset range for Accept-Charset

    CharsetRange::charset

    fn CharsetRange::charset(self : CharsetRange) -> String

    CharsetRange::equal

    CharsetRange::qvalue

    fn CharsetRange::qvalue(self : CharsetRange) -> QValue

    CharsetRange::to_string

    fn CharsetRange::to_string(self : CharsetRange) -> String

    ConditionalError

    pub(all) enum ConditionalError {
    Empty
    InvalidFormat
    ETagError
    DateError
    } derive(Eq,
    Debug
    )

    Conditional request header parsing errors (RFC 9110 Section 13)

    ConditionalError::equal

    ConditionalError::output

    fn ConditionalError::output(self : ConditionalError, logger : &Logger) -> Unit

    ConditionalError::to_string

    fn ConditionalError::to_string(self : ConditionalError) -> String

    ContentCoding

    pub(all) enum ContentCoding {
    Gzip
    Deflate
    Compress
    Identity
    Br
    Zstd
    Other(String)
    } derive(Eq,
    Debug
    )

    Content Coding (compression algorithm)

    ContentCoding::equal

    ContentCoding::output

    fn ContentCoding::output(self : ContentCoding, logger : &Logger) -> Unit

    ContentCoding::to_string

    fn ContentCoding::to_string(self : ContentCoding) -> String

    ContentDigest

    pub(all) struct ContentDigest {
    entries : Array[(String, DigestValue)]
    } derive(Eq)

    Content-Digest header (RFC 9530)

    ContentDigest::entries

    fn ContentDigest::entries(self : ContentDigest) -> Array[(String, DigestValue)]

    ContentDigest::equal

    ContentDigest::get

    fn ContentDigest::get(self : ContentDigest, algorithm : String) -> DigestValue?

    ContentDigest::parse

    fn ContentDigest::parse(input : String) -> Result[ContentDigest, DigestFieldsError]

    ContentDigest::to_string

    fn ContentDigest::to_string(self : ContentDigest) -> String

    ContentDisposition

    pub(all) struct ContentDisposition {
    disposition_type : DispositionType
    filename : String?
    filename_ext : String?
    name : String?
    parameters : Array[(String, String)]
    } derive(Eq)

    Content-Disposition header (RFC 6266)

    ContentDisposition::disposition_type

    fn ContentDisposition::disposition_type(self : ContentDisposition) -> DispositionType

    ContentDisposition::equal

    ContentDisposition::filename

    fn ContentDisposition::filename(self : ContentDisposition) -> String?

    ContentDisposition::filename_ascii

    fn ContentDisposition::filename_ascii(self : ContentDisposition) -> String?

    ContentDisposition::filename_ext

    fn ContentDisposition::filename_ext(self : ContentDisposition) -> String?

    ContentDisposition::is_attachment

    fn ContentDisposition::is_attachment(self : ContentDisposition) -> Bool

    ContentDisposition::is_form_data

    fn ContentDisposition::is_form_data(self : ContentDisposition) -> Bool

    ContentDisposition::is_inline

    fn ContentDisposition::is_inline(self : ContentDisposition) -> Bool

    ContentDisposition::name

    fn ContentDisposition::name(self : ContentDisposition) -> String?

    ContentDisposition::new

    ContentDisposition::parameter

    fn ContentDisposition::parameter(self : ContentDisposition, name : String) -> String?

    ContentDisposition::parse

    fn ContentDisposition::parse(input : String) -> Result[ContentDisposition, ContentDispositionError]

    ContentDisposition::to_string

    fn ContentDisposition::to_string(self : ContentDisposition) -> String

    ContentDisposition::with_filename

    fn ContentDisposition::with_filename(self : ContentDisposition, filename : String) -> ContentDisposition

    ContentDisposition::with_filename_ext

    fn ContentDisposition::with_filename_ext(self : ContentDisposition, filename_ext : String) -> ContentDisposition

    ContentDisposition::with_name

    fn ContentDisposition::with_name(self : ContentDisposition, name : String) -> ContentDisposition

    ContentDispositionError

    pub(all) enum ContentDispositionError {
    Empty
    InvalidFormat
    InvalidDispositionType
    InvalidParameter
    InvalidExtValue
    } derive(Eq,
    Debug
    )

    Content-Disposition header parsing errors (RFC 6266)

    ContentDispositionError::equal

    ContentDispositionError::output

    fn ContentDispositionError::output(self : ContentDispositionError, logger : &Logger) -> Unit

    ContentDispositionError::to_string

    fn ContentDispositionError::to_string(self : ContentDispositionError) -> String

    ContentEncoding

    pub(all) struct ContentEncoding {
    encodings : Array[ContentCoding]
    } derive(Eq)

    Content-Encoding header (RFC 9110 Section 8.4)

    ContentEncoding::encodings

    ContentEncoding::equal

    ContentEncoding::has_br

    fn ContentEncoding::has_br(self : ContentEncoding) -> Bool

    ContentEncoding::has_compress

    fn ContentEncoding::has_compress(self : ContentEncoding) -> Bool

    ContentEncoding::has_deflate

    fn ContentEncoding::has_deflate(self : ContentEncoding) -> Bool

    ContentEncoding::has_gzip

    fn ContentEncoding::has_gzip(self : ContentEncoding) -> Bool

    ContentEncoding::has_identity

    fn ContentEncoding::has_identity(self : ContentEncoding) -> Bool

    ContentEncoding::has_zstd

    fn ContentEncoding::has_zstd(self : ContentEncoding) -> Bool

    ContentEncoding::parse

    fn ContentEncoding::parse(input : String) -> Result[ContentEncoding, ContentEncodingError]

    ContentEncoding::to_string

    fn ContentEncoding::to_string(self : ContentEncoding) -> String

    ContentEncodingError

    pub(all) enum ContentEncodingError {
    Empty
    InvalidFormat
    InvalidEncoding
    } derive(Eq,
    Debug
    )

    Content-Encoding header parsing errors (RFC 9110 Section 8.4)

    ContentEncodingError::equal

    ContentEncodingError::output

    fn ContentEncodingError::output(self : ContentEncodingError, logger : &Logger) -> Unit

    ContentEncodingError::to_string

    fn ContentEncodingError::to_string(self : ContentEncodingError) -> String

    ContentLanguage

    pub(all) struct ContentLanguage {
    tags : Array[String]
    } derive(Eq)

    Content-Language header (RFC 9110 Section 8.5)

    ContentLanguage::equal

    ContentLanguage::parse

    fn ContentLanguage::parse(input : String) -> Result[ContentLanguage, ContentLanguageError]

    ContentLanguage::tags

    fn ContentLanguage::tags(self : ContentLanguage) -> Array[String]

    ContentLanguage::to_string

    fn ContentLanguage::to_string(self : ContentLanguage) -> String

    ContentLanguageError

    pub(all) enum ContentLanguageError {
    Empty
    InvalidFormat
    InvalidLanguageTag
    } derive(Eq,
    Debug
    )

    Content-Language header parsing errors (RFC 9110 Section 8.5)

    ContentLanguageError::equal

    ContentLanguageError::output

    fn ContentLanguageError::output(self : ContentLanguageError, logger : &Logger) -> Unit

    ContentLanguageError::to_string

    fn ContentLanguageError::to_string(self : ContentLanguageError) -> String

    ContentLocation

    pub(all) struct ContentLocation {
    uri : Uri
    } derive(Eq)

    Content-Location header (RFC 9110 Section 8.6)

    ContentLocation::equal

    ContentLocation::parse

    fn ContentLocation::parse(input : String) -> Result[ContentLocation, ContentLocationError]

    ContentLocation::to_string

    fn ContentLocation::to_string(self : ContentLocation) -> String

    ContentLocation::uri

    ContentLocationError

    pub(all) enum ContentLocationError {
    Empty
    InvalidUri
    } derive(Eq,
    Debug
    )

    Content-Location header parsing errors (RFC 9110 Section 8.6)

    ContentLocationError::equal

    ContentLocationError::output

    fn ContentLocationError::output(self : ContentLocationError, logger : &Logger) -> Unit

    ContentLocationError::to_string

    fn ContentLocationError::to_string(self : ContentLocationError) -> String

    ContentRange

    pub(all) struct ContentRange {
    unit : String
    start : UInt64?
    end : UInt64?
    complete_length : UInt64?
    } derive(Eq)

    Content-Range header (RFC 9110 Section 14.4)

    ContentRange::complete_length

    fn ContentRange::complete_length(self : ContentRange) -> UInt64?

    ContentRange::end

    fn ContentRange::end(self : ContentRange) -> UInt64?

    ContentRange::equal

    ContentRange::is_unsatisfied

    fn ContentRange::is_unsatisfied(self : ContentRange) -> Bool

    ContentRange::length

    fn ContentRange::length(self : ContentRange) -> UInt64?

    ContentRange::new_bytes

    fn ContentRange::new_bytes(start : UInt64, end : UInt64, complete_length : UInt64?) -> ContentRange

    ContentRange::parse

    fn ContentRange::parse(input : String) -> Result[ContentRange, RangeError]

    ContentRange::start

    fn ContentRange::start(self : ContentRange) -> UInt64?

    ContentRange::to_string

    fn ContentRange::to_string(self : ContentRange) -> String

    ContentRange::unit

    fn ContentRange::unit(self : ContentRange) -> String

    ContentRange::unsatisfied

    fn ContentRange::unsatisfied(unit : String, complete_length : UInt64) -> ContentRange

    ContentType

    pub(all) struct ContentType {
    media_type : String
    subtype : String
    parameters : Array[(String, String)]
    } derive(Eq)

    Content-Type header (RFC 9110 Section 8.3)

    ContentType::boundary

    fn ContentType::boundary(self : ContentType) -> String?

    ContentType::charset

    fn ContentType::charset(self : ContentType) -> String?

    ContentType::equal

    fn ContentType::equal(ContentType, ContentType) -> Bool

    ContentType::is_form_data

    fn ContentType::is_form_data(self : ContentType) -> Bool

    ContentType::is_form_urlencoded

    fn ContentType::is_form_urlencoded(self : ContentType) -> Bool

    ContentType::is_json

    fn ContentType::is_json(self : ContentType) -> Bool

    ContentType::is_multipart

    fn ContentType::is_multipart(self : ContentType) -> Bool

    ContentType::is_text

    fn ContentType::is_text(self : ContentType) -> Bool

    ContentType::media_type

    fn ContentType::media_type(self : ContentType) -> String

    ContentType::mime_type

    fn ContentType::mime_type(self : ContentType) -> String

    ContentType::new

    fn ContentType::new(media_type : String, subtype : String) -> ContentType

    ContentType::parameter

    fn ContentType::parameter(self : ContentType, name : String) -> String?

    ContentType::parameters

    fn ContentType::parameters(self : ContentType) -> Array[(String, String)]

    ContentType::parse

    fn ContentType::parse(input : String) -> Result[ContentType, ContentTypeError]

    ContentType::subtype

    fn ContentType::subtype(self : ContentType) -> String

    ContentType::to_string

    fn ContentType::to_string(self : ContentType) -> String

    ContentType::with_parameter

    fn ContentType::with_parameter(self : ContentType, name : String, value : String) -> ContentType

    ContentTypeError

    pub(all) enum ContentTypeError {
    Empty
    InvalidMediaType
    InvalidParameter
    UnterminatedQuote
    } derive(Eq,
    Debug
    )

    Content-Type header parsing errors (RFC 9110 Section 8.3)

    ContentTypeError::equal

    ContentTypeError::output

    fn ContentTypeError::output(self : ContentTypeError, logger : &Logger) -> Unit

    ContentTypeError::to_string

    fn ContentTypeError::to_string(self : ContentTypeError) -> String

    pub(all) struct Cookie {
    name : String
    value : String
    } derive(Eq)

    Cookie (name=value pair)

    Cookie::equal

    fn Cookie::equal(Cookie, Cookie) -> Bool

    Cookie::name

    fn Cookie::name(self : Cookie) -> String

    Cookie::new

    fn Cookie::new(name : String, value : String) -> Result[Cookie, CookieError]

    Cookie::parse

    fn Cookie::parse(input : String) -> Result[Array[Cookie], CookieError]

    Cookie::to_string

    fn Cookie::to_string(self : Cookie) -> String

    Cookie::value

    fn Cookie::value(self : Cookie) -> String

    CookieError

    pub(all) enum CookieError {
    Empty
    InvalidFormat
    InvalidName
    InvalidValue
    InvalidAttribute
    InvalidExpires
    InvalidMaxAge
    InvalidSameSite
    } derive(Eq,
    Debug
    )

    Cookie parsing errors (RFC 6265)
    impl Show for CookieError

    CookieError::equal

    fn CookieError::equal(CookieError, CookieError) -> Bool

    CookieError::output

    fn CookieError::output(self : CookieError, logger : &Logger) -> Unit

    CookieError::to_string

    fn CookieError::to_string(self : CookieError) -> String

    DateError

    pub(all) enum DateError {
    Empty
    InvalidFormat
    InvalidDayName
    InvalidDay
    InvalidMonth
    InvalidYear
    InvalidHour
    InvalidMinute
    InvalidSecond
    NotGmt
    } derive(Eq,
    Debug
    )

    HTTP-date parsing errors
    impl Show for DateError

    DateError::equal

    fn DateError::equal(DateError, DateError) -> Bool

    DateError::output

    fn DateError::output(self : DateError, logger : &Logger) -> Unit

    DateError::to_string

    fn DateError::to_string(self : DateError) -> String

    DayOfWeek

    pub(all) enum DayOfWeek {
    Sunday
    Monday
    Tuesday
    Wednesday
    Thursday
    Friday
    Saturday
    } derive(Eq,
    Debug
    )

    Day of week
    impl Show for DayOfWeek

    DayOfWeek::equal

    fn DayOfWeek::equal(DayOfWeek, DayOfWeek) -> Bool

    DayOfWeek::output

    fn DayOfWeek::output(self : DayOfWeek, logger : &Logger) -> Unit

    DayOfWeek::to_string

    fn DayOfWeek::to_string(self : DayOfWeek) -> String

    DecodeState

    pub(all) enum DecodeState {
    Start
    StartLine
    Headers
    Body(Int)
    Complete
    } derive(Eq,
    Debug
    )

    Decoder state machine
    impl Show for DecodeState

    DecodeState::equal

    fn DecodeState::equal(DecodeState, DecodeState) -> Bool

    DecodeState::output

    fn DecodeState::output(self : DecodeState, logger : &Logger) -> Unit

    DecodeState::to_string

    fn DecodeState::to_string(self : DecodeState) -> String

    DecoderLimits

    pub(all) struct DecoderLimits {
    max_buffer_size : Int
    max_headers_count : Int
    max_header_line_size : Int
    max_body_size : Int
    } derive(Eq,
    Debug
    )

    Decoder limits to prevent resource exhaustion

    DecoderLimits::default

    fn DecoderLimits::default() -> DecoderLimits

    DecoderLimits::equal

    DecoderLimits::output

    fn DecoderLimits::output(self : DecoderLimits, logger : &Logger) -> Unit

    DecoderLimits::to_string

    fn DecoderLimits::to_string(self : DecoderLimits) -> String

    DecoderLimits::unlimited

    fn DecoderLimits::unlimited() -> DecoderLimits

    DigestAuth

    pub(all) struct DigestAuth {
    params : Array[(String, String)]
    } derive(Eq)

    Digest Authentication (Authorization)

    DigestAuth::equal

    fn DigestAuth::equal(DigestAuth, DigestAuth) -> Bool

    DigestAuth::nonce

    fn DigestAuth::nonce(self : DigestAuth) -> String?

    DigestAuth::param

    fn DigestAuth::param(self : DigestAuth, name : String) -> String?

    DigestAuth::parse

    fn DigestAuth::parse(input : String) -> Result[DigestAuth, AuthError]

    DigestAuth::realm

    fn DigestAuth::realm(self : DigestAuth) -> String?

    DigestAuth::response

    fn DigestAuth::response(self : DigestAuth) -> String?

    DigestAuth::to_header_value

    fn DigestAuth::to_header_value(self : DigestAuth) -> String

    DigestAuth::to_string

    fn DigestAuth::to_string(self : DigestAuth) -> String

    DigestAuth::uri

    fn DigestAuth::uri(self : DigestAuth) -> String?

    DigestAuth::username

    fn DigestAuth::username(self : DigestAuth) -> String?

    DigestChallenge

    pub(all) struct DigestChallenge {
    params : Array[(String, String)]
    } derive(Eq)

    Digest Authentication Challenge (WWW-Authenticate)

    DigestChallenge::equal

    DigestChallenge::nonce

    fn DigestChallenge::nonce(self : DigestChallenge) -> String?

    DigestChallenge::param

    fn DigestChallenge::param(self : DigestChallenge, name : String) -> String?

    DigestChallenge::parse

    fn DigestChallenge::parse(input : String) -> Result[DigestChallenge, AuthError]

    DigestChallenge::realm

    fn DigestChallenge::realm(self : DigestChallenge) -> String?

    DigestChallenge::to_header_value

    fn DigestChallenge::to_header_value(self : DigestChallenge) -> String

    DigestChallenge::to_string

    fn DigestChallenge::to_string(self : DigestChallenge) -> String

    DigestEntry

    pub(all) struct DigestEntry {
    algorithm : String
    value : DigestValue
    } derive(Eq)

    Digest entry (algorithm + digest value)

    DigestEntry::algorithm

    fn DigestEntry::algorithm(self : DigestEntry) -> String

    DigestEntry::equal

    fn DigestEntry::equal(DigestEntry, DigestEntry) -> Bool

    DigestEntry::new

    fn DigestEntry::new(algorithm : String, value : DigestValue) -> DigestEntry

    DigestEntry::to_string

    fn DigestEntry::to_string(self : DigestEntry) -> String

    DigestEntry::value

    fn DigestEntry::value(self : DigestEntry) -> DigestValue

    DigestFieldsError

    pub(all) enum DigestFieldsError {
    Empty
    InvalidFormat
    InvalidAlgorithm
    InvalidByteSequence
    InvalidBase64
    InvalidPreference
    } derive(Eq,
    Debug
    )

    Digest fields error types

    DigestFieldsError::equal

    DigestFieldsError::output

    fn DigestFieldsError::output(self : DigestFieldsError, logger : &Logger) -> Unit

    DigestFieldsError::to_string

    fn DigestFieldsError::to_string(self : DigestFieldsError) -> String

    DigestPreference

    pub(all) struct DigestPreference {
    algorithm : String
    weight : Int
    } derive(Eq)

    Digest preference (algorithm + weight 0-10)

    DigestPreference::algorithm

    fn DigestPreference::algorithm(self : DigestPreference) -> String

    DigestPreference::equal

    DigestPreference::new

    fn DigestPreference::new(algorithm : String, weight : Int) -> DigestPreference

    DigestPreference::to_string

    fn DigestPreference::to_string(self : DigestPreference) -> String

    DigestPreference::weight

    fn DigestPreference::weight(self : DigestPreference) -> Int

    DigestValue

    pub(all) struct DigestValue {
    bytes : Array[Byte]
    } derive(Eq)

    Digest value (RFC 9530 section 4) Format: :base64:

    DigestValue::bytes

    fn DigestValue::bytes(self : DigestValue) -> Array[Byte]

    DigestValue::equal

    fn DigestValue::equal(DigestValue, DigestValue) -> Bool

    DigestValue::new

    fn DigestValue::new(bytes : Array[Byte]) -> DigestValue

    DigestValue::to_string

    fn DigestValue::to_string(self : DigestValue) -> String

    DispositionType

    pub(all) enum DispositionType {
    Inline
    Attachment
    FormData
    } derive(Eq)

    Disposition type

    DispositionType::equal

    DispositionType::to_string

    fn DispositionType::to_string(self : DispositionType) -> String

    ETagError

    pub(all) enum ETagError {
    Empty
    InvalidFormat
    MissingQuote
    InvalidCharacter
    } derive(Eq,
    Debug
    )

    ETag parsing errors
    impl Show for ETagError

    ETagError::equal

    fn ETagError::equal(ETagError, ETagError) -> Bool

    ETagError::output

    fn ETagError::output(self : ETagError, logger : &Logger) -> Unit

    ETagError::to_string

    fn ETagError::to_string(self : ETagError) -> String

    ETagList

    pub(all) enum ETagList {
    Any
    Tags(Array[EntityTag])
    } derive(Eq,
    Debug
    )

    ETag list for If-Match, If-None-Match headers
    impl Show for ETagList

    ETagList::contains_strong

    fn ETagList::contains_strong(self : ETagList, etag : EntityTag) -> Bool

    ETagList::contains_weak

    fn ETagList::contains_weak(self : ETagList, etag : EntityTag) -> Bool

    ETagList::equal

    fn ETagList::equal(ETagList, ETagList) -> Bool

    ETagList::is_any

    fn ETagList::is_any(self : ETagList) -> Bool

    ETagList::output

    fn ETagList::output(self : ETagList, logger : &Logger) -> Unit

    ETagList::to_string

    fn ETagList::to_string(self : ETagList) -> String

    EncodingRange

    pub(all) struct EncodingRange {
    coding : String
    q : QValue
    } derive(Eq)

    Encoding range for Accept-Encoding

    EncodingRange::coding

    fn EncodingRange::coding(self : EncodingRange) -> String

    EncodingRange::equal

    EncodingRange::qvalue

    fn EncodingRange::qvalue(self : EncodingRange) -> QValue

    EncodingRange::to_string

    fn EncodingRange::to_string(self : EncodingRange) -> String

    EntityTag

    pub(all) struct EntityTag {
    weak : Bool
    tag : String
    } derive(Eq,
    Debug
    )

    Entity Tag (ETag) (RFC 9110 Section 8.8.3)
    impl Show for EntityTag

    EntityTag::equal

    fn EntityTag::equal(EntityTag, EntityTag) -> Bool

    EntityTag::is_strong

    fn EntityTag::is_strong(self : EntityTag) -> Bool

    EntityTag::is_weak

    fn EntityTag::is_weak(self : EntityTag) -> Bool

    EntityTag::output

    fn EntityTag::output(self : EntityTag, logger : &Logger) -> Unit

    EntityTag::parse

    fn EntityTag::parse(input : String) -> Result[EntityTag, ETagError]

    EntityTag::strong

    fn EntityTag::strong(tag : String) -> Result[EntityTag, ETagError]

    EntityTag::strong_compare

    fn EntityTag::strong_compare(self : EntityTag, other : EntityTag) -> Bool

    EntityTag::tag

    fn EntityTag::tag(self : EntityTag) -> String

    EntityTag::to_string

    fn EntityTag::to_string(self : EntityTag) -> String

    EntityTag::weak

    fn EntityTag::weak(tag : String) -> Result[EntityTag, ETagError]

    EntityTag::weak_compare

    fn EntityTag::weak_compare(self : EntityTag, other : EntityTag) -> Bool

    Expect

    pub(all) struct Expect {
    items : Array[Expectation]
    } derive(Eq,
    Debug
    )

    Expect header (RFC 9110 Section 10.1.1)
    impl Show for Expect

    Expect::equal

    fn Expect::equal(Expect, Expect) -> Bool

    Expect::has_100_continue

    fn Expect::has_100_continue(self : Expect) -> Bool

    Expect::items

    fn Expect::items(self : Expect) -> Array[Expectation]

    Expect::output

    fn Expect::output(self : Expect, logger : &Logger) -> Unit

    Expect::parse

    fn Expect::parse(input : String) -> Result[Expect, ExpectError]

    Expect::to_string

    fn Expect::to_string(self : Expect) -> String

    ExpectError

    pub(all) enum ExpectError {
    Empty
    InvalidFormat
    InvalidToken
    InvalidValue
    } derive(Eq,
    Debug
    )

    Expect header parsing errors (RFC 9110 Section 10.1.1)
    impl Show for ExpectError

    ExpectError::equal

    fn ExpectError::equal(ExpectError, ExpectError) -> Bool

    ExpectError::output

    fn ExpectError::output(self : ExpectError, logger : &Logger) -> Unit

    ExpectError::to_string

    fn ExpectError::to_string(self : ExpectError) -> String

    Expectation

    pub(all) struct Expectation {
    token : String
    value : String?
    } derive(Eq,
    Debug
    )

    Expectation item
    impl Show for Expectation

    Expectation::equal

    fn Expectation::equal(Expectation, Expectation) -> Bool

    Expectation::is_100_continue

    fn Expectation::is_100_continue(self : Expectation) -> Bool

    Expectation::output

    fn Expectation::output(self : Expectation, logger : &Logger) -> Unit

    Expectation::to_string

    fn Expectation::to_string(self : Expectation) -> String

    Expectation::token

    fn Expectation::token(self : Expectation) -> String

    Expectation::value

    fn Expectation::value(self : Expectation) -> String?

    Expires

    pub(all) struct Expires {
    date : HttpDate
    } derive(Eq)

    Expires header (RFC 9111 Section 5.3)

    Expires::date

    fn Expires::date(self : Expires) -> HttpDate

    Expires::equal

    fn Expires::equal(Expires, Expires) -> Bool

    Expires::new

    fn Expires::new(date : HttpDate) -> Expires

    Expires::parse

    fn Expires::parse(input : String) -> Result[Expires, CacheError]

    Expires::to_string

    fn Expires::to_string(self : Expires) -> String

    Host

    pub(all) struct Host {
    host : String
    port : Int?
    } derive(Eq,
    Debug
    )

    Host header (RFC 9110 Section 7.2)
    impl Show for Host

    Host::equal

    fn Host::equal(Host, Host) -> Bool

    Host::host

    fn Host::host(self : Host) -> String

    Host::is_ipv6

    fn Host::is_ipv6(self : Host) -> Bool

    Host::output

    fn Host::output(self : Host, logger : &Logger) -> Unit

    Host::parse

    fn Host::parse(input : String) -> Result[Host, HostError]

    Host::port

    fn Host::port(self : Host) -> Int?

    Host::to_string

    fn Host::to_string(self : Host) -> String

    HostError

    pub(all) enum HostError {
    Empty
    InvalidFormat
    InvalidHost
    InvalidPort
    } derive(Eq,
    Debug
    )

    Host header parsing errors (RFC 9110 Section 7.2)
    impl Show for HostError

    HostError::equal

    fn HostError::equal(HostError, HostError) -> Bool

    HostError::output

    fn HostError::output(self : HostError, logger : &Logger) -> Unit

    HostError::to_string

    fn HostError::to_string(self : HostError) -> String

    HttpDate

    pub(all) struct HttpDate {
    day_of_week : DayOfWeek
    day : Int
    month : Int
    year : Int
    hour : Int
    minute : Int
    second : Int
    } derive(Eq,
    Debug
    )

    HTTP-date structure (RFC 9110 Section 5.6.7)

    Supports three formats:
    • IMF-fixdate: Sun, 06 Nov 1994 08:49:37 GMT (preferred)
    • RFC 850: Sunday, 06-Nov-94 08:49:37 GMT (obsolete)
    • ANSI C asctime: Sun Nov 6 08:49:37 1994 (obsolete)
    impl Show for HttpDate

    HttpDate::day

    fn HttpDate::day(self : HttpDate) -> Int

    HttpDate::day_of_week

    fn HttpDate::day_of_week(self : HttpDate) -> DayOfWeek

    HttpDate::equal

    fn HttpDate::equal(HttpDate, HttpDate) -> Bool

    HttpDate::hour

    fn HttpDate::hour(self : HttpDate) -> Int

    HttpDate::minute

    fn HttpDate::minute(self : HttpDate) -> Int

    HttpDate::month

    fn HttpDate::month(self : HttpDate) -> Int

    HttpDate::new

    fn HttpDate::new(day_of_week : DayOfWeek, day : Int, month : Int, year : Int, hour : Int, minute : Int, second : Int) -> Result[HttpDate, DateError]

    HttpDate::output

    fn HttpDate::output(self : HttpDate, logger : &Logger) -> Unit

    HttpDate::parse

    fn HttpDate::parse(input : String) -> Result[HttpDate, DateError]

    HttpDate::second

    fn HttpDate::second(self : HttpDate) -> Int

    HttpDate::to_string

    fn HttpDate::to_string(self : HttpDate) -> String

    HttpDate::year

    fn HttpDate::year(self : HttpDate) -> Int

    HttpError

    pub(all) enum HttpError {
    InvalidData(String)
    BufferOverflow(Int, Int)
    TooManyHeaders(Int, Int)
    HeaderLineTooLong(Int, Int)
    BodyTooLarge(Int, Int)
    UnexpectedEof
    InvalidHeaderValue
    InvalidStatusCode
    InvalidChunkSize
    } derive(Eq,
    Debug
    )

    HTTP parsing errors
    impl Show for HttpError

    HttpError::equal

    fn HttpError::equal(HttpError, HttpError) -> Bool

    HttpError::output

    fn HttpError::output(self : HttpError, logger : &Logger) -> Unit

    HttpError::to_string

    fn HttpError::to_string(self : HttpError) -> String

    IfMatch

    pub(all) struct IfMatch {
    etags : ETagList
    } derive(Eq)

    If-Match header (RFC 9110 Section 13.1.1)

    IfMatch::equal

    fn IfMatch::equal(IfMatch, IfMatch) -> Bool

    IfMatch::etags

    fn IfMatch::etags(self : IfMatch) -> ETagList

    IfMatch::is_any

    fn IfMatch::is_any(self : IfMatch) -> Bool

    IfMatch::matches

    fn IfMatch::matches(self : IfMatch, etag : EntityTag) -> Bool

    IfMatch::parse

    fn IfMatch::parse(input : String) -> Result[IfMatch, ConditionalError]

    IfMatch::to_string

    fn IfMatch::to_string(self : IfMatch) -> String

    IfModifiedSince

    pub(all) struct IfModifiedSince {
    date : HttpDate
    } derive(Eq)

    If-Modified-Since header (RFC 9110 Section 13.1.3)

    IfModifiedSince::date

    IfModifiedSince::equal

    IfModifiedSince::parse

    fn IfModifiedSince::parse(input : String) -> Result[IfModifiedSince, ConditionalError]

    IfModifiedSince::to_string

    fn IfModifiedSince::to_string(self : IfModifiedSince) -> String

    IfNoneMatch

    pub(all) struct IfNoneMatch {
    etags : ETagList
    } derive(Eq)

    If-None-Match header (RFC 9110 Section 13.1.2)

    IfNoneMatch::equal

    fn IfNoneMatch::equal(IfNoneMatch, IfNoneMatch) -> Bool

    IfNoneMatch::etags

    fn IfNoneMatch::etags(self : IfNoneMatch) -> ETagList

    IfNoneMatch::is_any

    fn IfNoneMatch::is_any(self : IfNoneMatch) -> Bool

    IfNoneMatch::matches

    fn IfNoneMatch::matches(self : IfNoneMatch, etag : EntityTag) -> Bool

    IfNoneMatch::parse

    fn IfNoneMatch::parse(input : String) -> Result[IfNoneMatch, ConditionalError]

    IfNoneMatch::to_string

    fn IfNoneMatch::to_string(self : IfNoneMatch) -> String

    IfRange

    pub(all) enum IfRange {
    ETag(EntityTag)
    Date(HttpDate)
    } derive(Eq)

    If-Range header (RFC 9110 Section 13.1.5)

    IfRange::date

    fn IfRange::date(self : IfRange) -> HttpDate?

    IfRange::equal

    fn IfRange::equal(IfRange, IfRange) -> Bool

    IfRange::etag

    fn IfRange::etag(self : IfRange) -> EntityTag?

    IfRange::is_date

    fn IfRange::is_date(self : IfRange) -> Bool

    IfRange::is_etag

    fn IfRange::is_etag(self : IfRange) -> Bool

    IfRange::parse

    fn IfRange::parse(input : String) -> Result[IfRange, ConditionalError]

    IfRange::to_string

    fn IfRange::to_string(self : IfRange) -> String

    IfUnmodifiedSince

    pub(all) struct IfUnmodifiedSince {
    date : HttpDate
    } derive(Eq)

    If-Unmodified-Since header (RFC 9110 Section 13.1.4)

    IfUnmodifiedSince::date

    IfUnmodifiedSince::equal

    IfUnmodifiedSince::parse

    fn IfUnmodifiedSince::parse(input : String) -> Result[IfUnmodifiedSince, ConditionalError]

    IfUnmodifiedSince::to_string

    fn IfUnmodifiedSince::to_string(self : IfUnmodifiedSince) -> String

    LanguageRange

    pub(all) struct LanguageRange {
    language : String
    q : QValue
    } derive(Eq)

    Language range for Accept-Language

    LanguageRange::equal

    LanguageRange::language

    fn LanguageRange::language(self : LanguageRange) -> String

    LanguageRange::qvalue

    fn LanguageRange::qvalue(self : LanguageRange) -> QValue

    LanguageRange::to_string

    fn LanguageRange::to_string(self : LanguageRange) -> String

    MediaRange

    pub(all) struct MediaRange {
    media_type : String
    subtype : String
    parameters : Array[(String, String)]
    q : QValue
    } derive(Eq)

    Media range for Accept header

    MediaRange::equal

    fn MediaRange::equal(MediaRange, MediaRange) -> Bool

    MediaRange::media_type

    fn MediaRange::media_type(self : MediaRange) -> String

    MediaRange::parameters

    fn MediaRange::parameters(self : MediaRange) -> Array[(String, String)]

    MediaRange::qvalue

    fn MediaRange::qvalue(self : MediaRange) -> QValue

    MediaRange::subtype

    fn MediaRange::subtype(self : MediaRange) -> String

    MediaRange::to_string

    fn MediaRange::to_string(self : MediaRange) -> String

    Protocol

    pub(all) struct Protocol {
    name : String
    version : String?
    } derive(Eq,
    Debug
    )

    Upgrade protocol
    impl Show for Protocol

    Protocol::equal

    fn Protocol::equal(Protocol, Protocol) -> Bool

    Protocol::name

    fn Protocol::name(self : Protocol) -> String

    Protocol::output

    fn Protocol::output(self : Protocol, logger : &Logger) -> Unit

    Protocol::to_string

    fn Protocol::to_string(self : Protocol) -> String

    Protocol::version

    fn Protocol::version(self : Protocol) -> String?

    ProxyAuthenticate

    pub(all) struct ProxyAuthenticate {
    challenge : AuthChallenge
    } derive(Eq)

    Proxy-Authenticate header

    ProxyAuthenticate::challenge

    ProxyAuthenticate::equal

    ProxyAuthenticate::parse

    fn ProxyAuthenticate::parse(input : String) -> Result[ProxyAuthenticate, AuthError]

    ProxyAuthenticate::to_header_value

    fn ProxyAuthenticate::to_header_value(self : ProxyAuthenticate) -> String

    ProxyAuthenticate::to_string

    fn ProxyAuthenticate::to_string(self : ProxyAuthenticate) -> String

    ProxyAuthorization

    pub(all) struct ProxyAuthorization {
    auth : Authorization
    } derive(Eq)

    Proxy-Authorization header

    ProxyAuthorization::authorization

    ProxyAuthorization::equal

    ProxyAuthorization::parse

    fn ProxyAuthorization::parse(input : String) -> Result[ProxyAuthorization, AuthError]

    ProxyAuthorization::to_header_value

    fn ProxyAuthorization::to_header_value(self : ProxyAuthorization) -> String

    ProxyAuthorization::to_string

    fn ProxyAuthorization::to_string(self : ProxyAuthorization) -> String

    QValue

    pub(all) struct QValue {
    value : Int
    } derive(Eq)

    Q value (0.000 - 1.000)

    QValue::equal

    fn QValue::equal(QValue, QValue) -> Bool

    QValue::parse

    fn QValue::parse(input : String) -> Result[QValue, AcceptError]

    QValue::to_string

    fn QValue::to_string(self : QValue) -> String

    QValue::value

    fn QValue::value(self : QValue) -> Int

    Range

    pub(all) struct Range {
    unit : String
    ranges : Array[RangeSpec]
    } derive(Eq)

    Range header (RFC 9110 Section 14.2)

    Range::equal

    fn Range::equal(Range, Range) -> Bool

    Range::first

    fn Range::first(self : Range) -> RangeSpec?

    Range::is_bytes

    fn Range::is_bytes(self : Range) -> Bool

    Range::parse

    fn Range::parse(input : String) -> Result[Range, RangeError]

    Range::ranges

    fn Range::ranges(self : Range) -> Array[RangeSpec]

    Range::to_string

    fn Range::to_string(self : Range) -> String

    Range::unit

    fn Range::unit(self : Range) -> String

    RangeError

    pub(all) enum RangeError {
    Empty
    InvalidFormat
    InvalidUnit
    InvalidRange
    InvalidBounds
    } derive(Eq,
    Debug
    )

    Range header parsing errors (RFC 9110)
    impl Show for RangeError

    RangeError::equal

    fn RangeError::equal(RangeError, RangeError) -> Bool

    RangeError::output

    fn RangeError::output(self : RangeError, logger : &Logger) -> Unit

    RangeError::to_string

    fn RangeError::to_string(self : RangeError) -> String

    RangeSpec

    pub(all) enum RangeSpec {
    Range(UInt64, UInt64)
    FromStart(UInt64)
    Suffix(UInt64)
    } derive(Eq)

    Range specification (RFC 9110 Section 14.2)

    RangeSpec::equal

    fn RangeSpec::equal(RangeSpec, RangeSpec) -> Bool

    RangeSpec::to_bounds

    fn RangeSpec::to_bounds(self : RangeSpec, total_length : UInt64) -> (UInt64, UInt64)?

    RangeSpec::to_string

    fn RangeSpec::to_string(self : RangeSpec) -> String

    ReprDigest

    pub(all) struct ReprDigest {
    entries : Array[(String, DigestValue)]
    } derive(Eq)

    Repr-Digest header (RFC 9530)

    ReprDigest::entries

    fn ReprDigest::entries(self : ReprDigest) -> Array[(String, DigestValue)]

    ReprDigest::equal

    fn ReprDigest::equal(ReprDigest, ReprDigest) -> Bool

    ReprDigest::get

    fn ReprDigest::get(self : ReprDigest, algorithm : String) -> DigestValue?

    ReprDigest::parse

    fn ReprDigest::parse(input : String) -> Result[ReprDigest, DigestFieldsError]

    ReprDigest::to_string

    fn ReprDigest::to_string(self : ReprDigest) -> String

    Request

    pub(all) struct Request {
    http_method : String
    uri : String
    version : String
    headers : Array[(String, String)]
    body : Array[Byte]
    } derive(Eq,
    Debug
    )

    HTTP Request representation
    impl Show for Request

    Request::body

    fn Request::body(self : Request, body : Array[Byte]) -> Request

    Request::content_length

    fn Request::content_length(self : Request) -> Int?

    Request::equal

    fn Request::equal(Request, Request) -> Bool

    Request::get_header

    fn Request::get_header(self : Request, name : String) -> String?

    Request::has_header

    fn Request::has_header(self : Request, name : String) -> Bool

    Request::header

    fn Request::header(self : Request, name : String, value : String) -> Request

    Request::http_method

    fn Request::http_method(self : Request) -> String

    Request::is_chunked

    fn Request::is_chunked(self : Request) -> Bool

    Request::is_keep_alive

    fn Request::is_keep_alive(self : Request) -> Bool

    Request::new

    fn Request::new(http_method : String, uri : String) -> Request

    Request::output

    fn Request::output(self : Request, logger : &Logger) -> Unit

    Request::to_string

    fn Request::to_string(self : Request) -> String

    Request::with_version

    fn Request::with_version(http_method : String, uri : String, version : String) -> Request

    RequestDecoder

    pub(all) struct RequestDecoder {
    buf : Array[Byte]
    state : DecodeState
    parsed_method : String?
    parsed_uri : String?
    parsed_version : String?
    headers : Array[(String, String)]
    body_buf : Array[Byte]
    content_length : Int?
    limits : DecoderLimits
    } derive(
    Debug
    )

    Sans I/O HTTP request decoder

    RequestDecoder::decode

    fn RequestDecoder::decode(self : RequestDecoder) -> Result[Request?, HttpError]

    RequestDecoder::feed

    fn RequestDecoder::feed(self : RequestDecoder, data : Array[Byte]) -> Result[Unit, HttpError]

    RequestDecoder::new

    RequestDecoder::output

    fn RequestDecoder::output(self : RequestDecoder, logger : &Logger) -> Unit

    RequestDecoder::remaining

    fn RequestDecoder::remaining(self : RequestDecoder) -> Array[Byte]

    RequestDecoder::reset

    fn RequestDecoder::reset(self : RequestDecoder) -> Unit

    RequestDecoder::to_string

    fn RequestDecoder::to_string(self : RequestDecoder) -> String

    RequestDecoder::with_limits

    fn RequestDecoder::with_limits(limits : DecoderLimits) -> RequestDecoder

    Response

    pub(all) struct Response {
    version : String
    status_code : Int
    reason_phrase : String
    headers : Array[(String, String)]
    body : Array[Byte]
    } derive(Eq,
    Debug
    )

    HTTP Response representation
    impl Show for Response

    Response::body

    fn Response::body(self : Response, body : Array[Byte]) -> Response

    Response::content_length

    fn Response::content_length(self : Response) -> Int?

    Response::equal

    fn Response::equal(Response, Response) -> Bool

    Response::get_header

    fn Response::get_header(self : Response, name : String) -> String?

    Response::has_header

    fn Response::has_header(self : Response, name : String) -> Bool

    Response::header

    fn Response::header(self : Response, name : String, value : String) -> Response

    Response::is_chunked

    fn Response::is_chunked(self : Response) -> Bool

    Response::is_client_error

    fn Response::is_client_error(self : Response) -> Bool

    Response::is_keep_alive

    fn Response::is_keep_alive(self : Response) -> Bool

    Response::is_redirect

    fn Response::is_redirect(self : Response) -> Bool

    Response::is_server_error

    fn Response::is_server_error(self : Response) -> Bool

    Response::is_success

    fn Response::is_success(self : Response) -> Bool

    Response::new

    fn Response::new(status_code : Int, reason_phrase : String) -> Response

    Response::output

    fn Response::output(self : Response, logger : &Logger) -> Unit

    Response::to_string

    fn Response::to_string(self : Response) -> String

    Response::with_version

    fn Response::with_version(version : String, status_code : Int, reason_phrase : String) -> Response

    ResponseDecoder

    pub(all) struct ResponseDecoder {
    buf : Array[Byte]
    state : DecodeState
    parsed_version : String?
    parsed_status_code : Int?
    parsed_reason : String?
    headers : Array[(String, String)]
    body_buf : Array[Byte]
    content_length : Int?
    limits : DecoderLimits
    } derive(
    Debug
    )

    Sans I/O HTTP response decoder

    ResponseDecoder::decode

    fn ResponseDecoder::decode(self : ResponseDecoder) -> Result[Response?, HttpError]

    ResponseDecoder::feed

    fn ResponseDecoder::feed(self : ResponseDecoder, data : Array[Byte]) -> Result[Unit, HttpError]

    ResponseDecoder::new

    ResponseDecoder::output

    fn ResponseDecoder::output(self : ResponseDecoder, logger : &Logger) -> Unit

    ResponseDecoder::remaining

    fn ResponseDecoder::remaining(self : ResponseDecoder) -> Array[Byte]

    ResponseDecoder::reset

    fn ResponseDecoder::reset(self : ResponseDecoder) -> Unit

    ResponseDecoder::to_string

    fn ResponseDecoder::to_string(self : ResponseDecoder) -> String

    ResponseDecoder::with_limits

    fn ResponseDecoder::with_limits(limits : DecoderLimits) -> ResponseDecoder

    SameSite

    pub(all) enum SameSite {
    Strict
    Lax
    SameSiteNone
    } derive(Eq)

    SameSite attribute

    SameSite::equal

    fn SameSite::equal(SameSite, SameSite) -> Bool

    SameSite::to_string

    fn SameSite::to_string(self : SameSite) -> String

    SetCookie

    pub(all) struct SetCookie {
    name : String
    value : String
    expires : HttpDate?
    max_age : Int?
    domain : String?
    path : String?
    secure : Bool
    http_only : Bool
    same_site : SameSite?
    } derive(Eq)

    Set-Cookie header

    SetCookie::domain

    fn SetCookie::domain(self : SetCookie) -> String?

    SetCookie::equal

    fn SetCookie::equal(SetCookie, SetCookie) -> Bool

    SetCookie::expires

    fn SetCookie::expires(self : SetCookie) -> HttpDate?

    SetCookie::http_only

    fn SetCookie::http_only(self : SetCookie) -> Bool

    SetCookie::max_age

    fn SetCookie::max_age(self : SetCookie) -> Int?

    SetCookie::name

    fn SetCookie::name(self : SetCookie) -> String

    SetCookie::new

    fn SetCookie::new(name : String, value : String) -> Result[SetCookie, CookieError]

    SetCookie::parse

    fn SetCookie::parse(input : String) -> Result[SetCookie, CookieError]

    SetCookie::path

    fn SetCookie::path(self : SetCookie) -> String?

    SetCookie::same_site

    fn SetCookie::same_site(self : SetCookie) -> SameSite?

    SetCookie::secure

    fn SetCookie::secure(self : SetCookie) -> Bool

    SetCookie::to_string

    fn SetCookie::to_string(self : SetCookie) -> String

    SetCookie::value

    fn SetCookie::value(self : SetCookie) -> String

    SetCookie::with_domain

    fn SetCookie::with_domain(self : SetCookie, domain : String) -> SetCookie

    SetCookie::with_expires

    fn SetCookie::with_expires(self : SetCookie, expires : HttpDate) -> SetCookie

    SetCookie::with_http_only

    fn SetCookie::with_http_only(self : SetCookie, http_only : Bool) -> SetCookie

    SetCookie::with_max_age

    fn SetCookie::with_max_age(self : SetCookie, max_age : Int) -> SetCookie

    SetCookie::with_path

    fn SetCookie::with_path(self : SetCookie, path : String) -> SetCookie

    SetCookie::with_same_site

    fn SetCookie::with_same_site(self : SetCookie, same_site : SameSite) -> SetCookie

    SetCookie::with_secure

    fn SetCookie::with_secure(self : SetCookie, secure : Bool) -> SetCookie

    Trailer

    pub(all) struct Trailer {
    fields : Array[String]
    } derive(Eq,
    Debug
    )

    Trailer header (RFC 9112 Section 7.1.2)
    impl Show for Trailer

    Trailer::equal

    fn Trailer::equal(Trailer, Trailer) -> Bool

    Trailer::fields

    fn Trailer::fields(self : Trailer) -> Array[String]

    Trailer::output

    fn Trailer::output(self : Trailer, logger : &Logger) -> Unit

    Trailer::parse

    fn Trailer::parse(input : String) -> Result[Trailer, TrailerError]

    Trailer::to_string

    fn Trailer::to_string(self : Trailer) -> String

    TrailerError

    pub(all) enum TrailerError {
    Empty
    InvalidFormat
    InvalidFieldName
    } derive(Eq,
    Debug
    )

    Trailer header parsing errors (RFC 9112 Section 7.1.2)

    TrailerError::equal

    TrailerError::output

    fn TrailerError::output(self : TrailerError, logger : &Logger) -> Unit

    TrailerError::to_string

    fn TrailerError::to_string(self : TrailerError) -> String

    Upgrade

    pub(all) struct Upgrade {
    protocols : Array[Protocol]
    } derive(Eq,
    Debug
    )

    Upgrade header (RFC 9110 Section 7.8)
    impl Show for Upgrade

    Upgrade::equal

    fn Upgrade::equal(Upgrade, Upgrade) -> Bool

    Upgrade::has_protocol

    fn Upgrade::has_protocol(self : Upgrade, protocol : String) -> Bool

    Upgrade::output

    fn Upgrade::output(self : Upgrade, logger : &Logger) -> Unit

    Upgrade::parse

    fn Upgrade::parse(input : String) -> Result[Upgrade, UpgradeError]

    Upgrade::protocols

    fn Upgrade::protocols(self : Upgrade) -> Array[Protocol]

    Upgrade::to_string

    fn Upgrade::to_string(self : Upgrade) -> String

    UpgradeError

    pub(all) enum UpgradeError {
    Empty
    InvalidFormat
    InvalidProtocol
    InvalidVersion
    } derive(Eq,
    Debug
    )

    Upgrade header parsing errors (RFC 9110 Section 7.8)

    UpgradeError::equal

    UpgradeError::output

    fn UpgradeError::output(self : UpgradeError, logger : &Logger) -> Unit

    UpgradeError::to_string

    fn UpgradeError::to_string(self : UpgradeError) -> String

    Uri

    pub(all) struct Uri {
    source : String
    scheme_end : Int?
    authority_start : Int?
    authority_end : Int?
    host_end : Int?
    port : Int?
    path_start : Int
    path_end : Int
    query_start : Int?
    query_end : Int?
    fragment_start : Int?
    } derive(Eq,
    Debug
    )

    Parsed URI (RFC 3986 Section 3)

    URI structure: foo://example.com:8042/over/there?name=ferret#nose _/ _/_/ ___/ _/ | | | | | scheme authority path query fragment
    impl Show for Uri

    Uri::as_str

    fn Uri::as_str(self : Uri) -> String

    Uri::authority

    fn Uri::authority(self : Uri) -> String?

    Uri::equal

    fn Uri::equal(Uri, Uri) -> Bool

    Uri::fragment

    fn Uri::fragment(self : Uri) -> String?

    Uri::host

    fn Uri::host(self : Uri) -> String?

    Uri::is_absolute

    fn Uri::is_absolute(self : Uri) -> Bool

    Uri::is_relative

    fn Uri::is_relative(self : Uri) -> Bool

    Uri::origin_form

    fn Uri::origin_form(self : Uri) -> String

    Uri::output

    fn Uri::output(self : Uri, logger : &Logger) -> Unit

    Uri::parse

    fn Uri::parse(input : String) -> Result[Uri, UriError]

    Uri::path

    fn Uri::path(self : Uri) -> String

    Uri::port

    fn Uri::port(self : Uri) -> Int?

    Uri::query

    fn Uri::query(self : Uri) -> String?

    Uri::scheme

    fn Uri::scheme(self : Uri) -> String?

    Uri::to_string

    fn Uri::to_string(self : Uri) -> String

    UriError

    pub(all) enum UriError {
    Empty
    InvalidPercentEncoding
    InvalidPort
    InvalidCharacter
    InvalidScheme
    InvalidHost
    InvalidUtf8
    } derive(Eq,
    Debug
    )

    URI parsing errors (RFC 3986)
    impl Show for UriError

    UriError::equal

    fn UriError::equal(UriError, UriError) -> Bool

    UriError::output

    fn UriError::output(self : UriError, logger : &Logger) -> Unit

    UriError::to_string

    fn UriError::to_string(self : UriError) -> String

    Vary

    pub(all) struct Vary {
    any : Bool
    fields : Array[String]
    } derive(Eq,
    Debug
    )

    Vary header (RFC 9110 Section 12.5.5)
    impl Show for Vary

    Vary::equal

    fn Vary::equal(Vary, Vary) -> Bool

    Vary::fields

    fn Vary::fields(self : Vary) -> Array[String]

    Vary::is_any

    fn Vary::is_any(self : Vary) -> Bool

    Vary::output

    fn Vary::output(self : Vary, logger : &Logger) -> Unit

    Vary::parse

    fn Vary::parse(input : String) -> Result[Vary, VaryError]

    Vary::to_string

    fn Vary::to_string(self : Vary) -> String

    VaryError

    pub(all) enum VaryError {
    Empty
    InvalidFormat
    InvalidFieldName
    } derive(Eq,
    Debug
    )

    Vary header parsing errors (RFC 9110 Section 12.5.5)
    impl Show for VaryError

    VaryError::equal

    fn VaryError::equal(VaryError, VaryError) -> Bool

    VaryError::output

    fn VaryError::output(self : VaryError, logger : &Logger) -> Unit

    VaryError::to_string

    fn VaryError::to_string(self : VaryError) -> String

    WantContentDigest

    pub(all) struct WantContentDigest {
    preferences : Array[DigestPreference]
    } derive(Eq)

    Want-Content-Digest header (RFC 9530)

    WantContentDigest::equal

    WantContentDigest::get

    fn WantContentDigest::get(self : WantContentDigest, algorithm : String) -> Int?

    WantContentDigest::parse

    fn WantContentDigest::parse(input : String) -> Result[WantContentDigest, DigestFieldsError]

    WantContentDigest::preferences

    WantContentDigest::to_string

    fn WantContentDigest::to_string(self : WantContentDigest) -> String

    WantReprDigest

    pub(all) struct WantReprDigest {
    preferences : Array[DigestPreference]
    } derive(Eq)

    Want-Repr-Digest header (RFC 9530)

    WantReprDigest::equal

    WantReprDigest::get

    fn WantReprDigest::get(self : WantReprDigest, algorithm : String) -> Int?

    WantReprDigest::parse

    fn WantReprDigest::parse(input : String) -> Result[WantReprDigest, DigestFieldsError]

    WantReprDigest::preferences

    WantReprDigest::to_string

    fn WantReprDigest::to_string(self : WantReprDigest) -> String

    WwwAuthenticate

    pub(all) struct WwwAuthenticate {
    realm : String
    charset : String?
    } derive(Eq)

    WWW-Authenticate header (Basic)

    WwwAuthenticate::basic

    fn WwwAuthenticate::basic(realm : String) -> WwwAuthenticate

    WwwAuthenticate::charset

    fn WwwAuthenticate::charset(self : WwwAuthenticate) -> String?

    WwwAuthenticate::equal

    WwwAuthenticate::parse

    fn WwwAuthenticate::parse(input : String) -> Result[WwwAuthenticate, AuthError]

    WwwAuthenticate::realm

    fn WwwAuthenticate::realm(self : WwwAuthenticate) -> String

    WwwAuthenticate::to_header_value

    fn WwwAuthenticate::to_header_value(self : WwwAuthenticate) -> String

    WwwAuthenticate::to_string

    fn WwwAuthenticate::to_string(self : WwwAuthenticate) -> String

    WwwAuthenticate::with_charset

    fn WwwAuthenticate::with_charset(self : WwwAuthenticate, charset : String) -> WwwAuthenticate

    encode_chunk

    fn encode_chunk(data : Array[Byte]) -> Array[Byte]

    Encode a single chunk of chunked transfer encoding

    encode_chunks

    fn encode_chunks(chunks : Array[Array[Byte]]) -> Array[Byte]

    Encode multiple chunks of chunked transfer encoding

    encode_request

    fn encode_request(request : Request) -> Array[Byte]

    Encode an HTTP request to bytes

    encode_request_headers

    fn encode_request_headers(request : Request) -> Array[Byte]

    Encode only the headers part of an HTTP request

    encode_response

    fn encode_response(response : Response) -> Array[Byte]

    Encode an HTTP response to bytes

    encode_response_headers

    fn encode_response_headers(response : Response) -> Array[Byte]

    Encode only the headers part of an HTTP response

    parse_etag_list

    fn parse_etag_list(input : String) -> Result[ETagList, ETagError]

    percent_decode

    fn percent_decode(input : String) -> Result[String, UriError]

    percent_decode_bytes

    fn percent_decode_bytes(input : String) -> Result[Array[Int], UriError]

    percent_encode

    fn percent_encode(input : String) -> String

    percent_encode_path

    fn percent_encode_path(input : String) -> String

    percent_encode_query

    fn percent_encode_query(input : String) -> String

    rg_parse_u64

    fn rg_parse_u64(s : String) -> UInt64?

    rg_u64_to_string

    fn rg_u64_to_string(n : UInt64) -> String