Skip to main content

BodyClassifier

Trait BodyClassifier 

Source
pub trait BodyClassifier:
    Send
    + Sync
    + 'static {
    // Required method
    fn classify(
        &self,
        status: StatusCode,
        headers: &HeaderMap,
        body: &[u8],
    ) -> BodyVerdict;
}
Expand description

Trait that inspects a completed HTTP response and returns a BodyVerdict.

Implement this to customise how your target site’s responses are interpreted.

Required Methods§

Source

fn classify( &self, status: StatusCode, headers: &HeaderMap, body: &[u8], ) -> BodyVerdict

Implementors§