Skip to main content

Module raw

Module raw 

Source
Expand description

Lower-level HTTP helpers for application/foctet envelopes.

These functions expose direct request/response/body helpers and are useful when callers need custom assembly.

The envelope protects HTTP body bytes only. Method, URI, status code, and outer headers remain visible to the surrounding HTTP transport.

Functionsยง

ensure_foctet_content_type
Validates that headers contain Content-Type: application/foctet.
has_body_only_scope
Returns true if headers contain x-foctet-scope: body-only.
is_foctet_content_type
Returns true if headers contain Content-Type: application/foctet.
open_http_body
Opens an application/foctet body to plaintext bytes.
open_http_body_with_limits
Opens an application/foctet body to plaintext bytes with explicit limits.
open_http_request
Validates foctet content type and opens request body.
open_http_request_with_limits
Validates foctet content type and opens request body with explicit limits.
open_http_response
Validates foctet content type and opens response body.
open_http_response_with_limits
Validates foctet content type and opens response body with explicit limits.
seal_http_body
Seals raw plaintext bytes to an application/foctet body.
seal_http_body_with_limits
Seals raw plaintext bytes to an application/foctet body with explicit limits.
seal_http_request
Seals request body and sets Content-Type: application/foctet.
seal_http_request_with_limits
Seals request body with explicit limits and sets Content-Type: application/foctet.
seal_http_response
Seals response body and sets Content-Type: application/foctet.
seal_http_response_with_limits
Seals response body with explicit limits and sets Content-Type: application/foctet.
set_foctet_content_type
Sets Content-Type: application/foctet.
set_foctet_scope_header
Sets the advisory Foctet scope header to body-only.