pub struct EnvRequestHttp {
pub host: String,
pub ip: Option<String>,
pub method: String,
pub path: String,
pub headers: HashMap<String, String>,
}Expand description
this.env - Environment Request Types This module defines the request types used by this.env to handle various ingress sources. It includes HTTP, WebSocket, and CLI requests, each with its own structure. These types are used to standardize how requests are processed and analyzed within the this.env framework. This allows for consistent handling of requests across different protocols and frameworks, making it easier to implement environment recognition, routing, and analytics. This module is designed to be extensible, allowing for future ingress types to be added as needed. */ A request made through HTTP, carrying host, path, headers and metadata. Represents an HTTP request with metadata and headers.
Fields§
§host: StringHost header or domain of the incoming request.
ip: Option<String>Optional remote IP address, if available.
method: StringHTTP method (e.g., GET, POST).
path: StringRequest path (e.g., /api/data).
headers: HashMap<String, String>Headers from the incoming request, flattened as string pairs.
Trait Implementations§
Source§impl Clone for EnvRequestHttp
impl Clone for EnvRequestHttp
Source§fn clone(&self) -> EnvRequestHttp
fn clone(&self) -> EnvRequestHttp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more