http library

Jetleaf HTTP sub-library

This sub-library defines the HTTP model and metadata abstractions used throughout the jetleaf_web package.

Importing package:jetleaf_web/http.dart provides types for working with HTTP messages, headers, methods, status codes, cookies, sessions, caching directives, ranges, entity tags, and media types.

These APIs are shared by both server- and client-side components and are independent of any specific transport or runtime.

Classes

CacheControl
Represents the HTTP Cache-Control header and allows fluent construction of cache directives.
ContentDisposition
Representation of the Content-Disposition HTTP header as defined in RFC 6266 and RFC 2183.
ContentDispositionBuilder
A mutable builder for constructing ContentDisposition instances.
DefaultHttpHeaderBuilder
A concrete implementation of HttpHeaderBuilder that provides default functionality for building HTTP headers with a fluent interface.
ETag
Represents an HTTP ETag entity tag for conditional requests.
HttpBody<T>
Represents an HTTP entity, consisting of optional headers and an optional body.
HttpCookie
Represents an HTTP cookie as a name-value pair, consistent with the content of the "Cookie" request header.
For cookies sent in responses, see ResponseCookie, which includes additional attributes such as expires, maxAge, domain, path, and secure expected in the "Set-Cookie" response header.
HttpCookies
A mutable collection of HttpCookie and ResponseCookie objects, representing all cookies associated with an HTTP request or response.
HttpHeaderBuilder<B extends HttpHeaderBuilder<B>>
An abstract builder interface for constructing HttpHeaders with a fluent API.
HttpHeaders
A comprehensive data structure representing HTTP request or response headers, mapping String header names to a list of String values with case-insensitive lookups.
HttpInputMessage
Represents an HTTP input message, typically corresponding to an incoming HTTP request or a deserialized response body.
HttpMessage
Represents the base abstraction for HTTP messages, containing both headers and a potential body.
HttpMethod
A type-safe representation of all standard HTTP request methods (verbs), such as GET, POST, PUT, DELETE, and others defined in the RFC 9110: HTTP Semantics.
HttpOutputMessage
Represents an HTTP output message, typically corresponding to a server response or a serialized outgoing request body.
HttpRange
Represents an HTTP Range as defined in RFC 7233.
This class handles parsing, validation, and formatting of HTTP Range headers, supporting byte ranges for partial content (HTTP 206 Partial Content responses).
HttpSession
Represents an HTTP session that allows server-side storage of user-specific data across multiple requests.
HttpStatus
A comprehensive utility class representing HTTP status codes, their meanings, and categories.
MediaType
A robust representation of an HTTP media type (also known as a MIME type), used to describe the format of data transmitted over HTTP.
ReadOnlyHttpHeaders
A read-only implementation of HttpHeaders that throws UnsupportedOperationException for any mutating operations.
ResponseBody<T>
Represents an HTTP response entity, consisting of a status code, optional headers, and an optional body of type T. Extends HttpBody to include HTTP response-specific details.
ResponseCookie
Represents an HTTP response cookie as defined in RFC 6265 with all attributes that can be set by the server in a Set-Cookie header.