Skip to main content

Crate rskit_http

Crate rskit_http 

Source
Expand description

Shared HTTP transport policies and Tower adapters used by rskit-server.

Structs§

CorrelationId
Correlation identifier carried through HTTP request extensions.
CorsPolicy
Cross-origin resource sharing policy.
RequestId
Request identifier carried through HTTP request extensions.
SecurityHeadersConfig
Secure-by-default response header configuration.
SecurityHeadersLayer
Tower layer that applies secure response headers.
SecurityHeadersService
Service produced by SecurityHeadersLayer.
TenantConfig
Configuration for tenant extraction via Tower middleware.
TenantId
Newtype wrapping a tenant ID string.

Enums§

TransportSecurity
Transport security mode used when applying response headers.

Functions§

app_error_status
Return the HTTP status code carried by an AppError.
correlation_id_from_extensions
Retrieve a CorrelationId from request extensions.
is_success_status
Return true when a status is in the successful 2xx range.
request_id_from_extensions
Retrieve a RequestId from request extensions.
set_correlation_id
Store a CorrelationId in request extensions.
set_request_id
Store a RequestId in request extensions.
set_tenant_in_extensions
Store a TenantId in request extensions.
status_to_error_code
Convert an HTTP status code into the canonical rskit error code.
tenant_from_extensions
Retrieve the TenantId from request extensions.

Type Aliases§

HttpHeaders
Framework-neutral HTTP header collection.
HttpRequest
Framework-neutral HTTP request type.
HttpResponse
Framework-neutral HTTP response type.
HttpStatusCode
Framework-neutral HTTP status code.