Skip to main content

Module http

Module http 

Source
Expand description

HTTP request, response, cookie, and resource types.

Re-exports§

pub use cookie::parse_cookies;
pub use cookie::Cookie;
pub use cookie::CookieOptions;
pub use cookie::SameSite;
pub use request_context::request_host;
pub use resources::PaginationMeta;
pub use resources::Resource;
pub use resources::ResourceCollection;
pub use resources::ResourceMap;

Modules§

cookie
Cookie handling for Ferro framework
request_context
Task-local request context accessible from any handler without a Request parameter.
resources
API resource and pagination types.

Structs§

HttpResponse
HTTP Response builder providing Laravel-like response creation
InertiaRedirect
Inertia-aware HTTP Redirect response builder.
MultipartForm
A parsed multipart/form-data body.
ParamError
Error type for missing route parameters
Redirect
HTTP Redirect response builder
RedirectRouteBuilder
Builder for redirects to named routes with parameters
Request
HTTP Request wrapper providing Laravel-like access to request data
RequestParts
Request parts after body has been separated
UploadedFile
A single uploaded file extracted from a multipart/form-data request.

Traits§

FormRequest
Trait for validated form/JSON request data
FromParam
Trait for types that can be extracted from a single path parameter
FromRequest
Trait for types that can be extracted from an HTTP request
ResponseExt
Extension trait for Response to enable method chaining on macros

Functions§

bytes
Create a binary response from raw bytes.
collect_body
Collect the full body from an Incoming stream
json
Create a JSON response from a serde_json::Value
parse_form
Parse bytes as form-urlencoded into the target type
parse_json
Parse bytes as JSON into the target type
text
Create a text response
validate_mime
Reject the file if its declared MIME type is not in allowed.
validate_size
Reject the file if file.size() > max_bytes.

Type Aliases§

Response
Response type alias - allows using ? operator for early returns