Skip to main content

Module http_inspector

Module http_inspector 

Source
Expand description

HTTP request and response inspector component.

Provides detailed visual inspection of HTTP requests and responses for debugging purposes. Unlike the simple one-line logging in logging.rs, this module provides comprehensive multi-line output showing headers, body previews, and timing information.

§Feature Gating

This module is designed for debug output. In production, inspectors should only be called when debug mode is explicitly enabled.

if output.is_debug_enabled() {
    let inspector = RequestInspector::new(OutputMode::Rich);
    println!("{}", inspector.inspect(&request_info));
}

Structs§

RequestInfo
HTTP request information for inspection.
RequestInspector
HTTP request inspector.
ResponseInfo
HTTP response information for inspection.
ResponseInspector
HTTP response inspector.