Skip to main content

Module http_utils

Module http_utils 

Source
Expand description

Shared HTTP utilities for client and server middleware.

This module provides common functionality used by both client-side and server-side HTTP middleware, ensuring consistent behavior and avoiding code duplication.

Functionsยง

default_loggable_content_types
Get default content types that are safe to log.
default_sensitive_headers
Get default sensitive headers to redact.
format_headers_for_logging
Format headers for logging with redaction.
redact_header_value
Redact sensitive header values.
redact_url_query
Redact query parameters from a URL.
should_log_body_for_content_type
Check if a content-type should allow body logging.