Skip to main content

HeaderOmitSettings

Trait HeaderOmitSettings 

Source
pub trait HeaderOmitSettings:
    Send
    + Sync
    + Debug {
    // Provided methods
    fn should_omit_default_content_type(&self) -> bool { ... }
    fn should_omit_default_content_length(&self) -> bool { ... }
}
Expand description

Configures whether the runtime should suppress protocol-default request headers during serialization.

All methods default to returning false so future trait additions do not break existing implementors.

Provided Methods§

Source

fn should_omit_default_content_type(&self) -> bool

Returns true if the runtime must not insert a default Content-Type header. A customer-supplied @httpHeader("Content-Type") value still takes priority and is unaffected by this flag.

Source

fn should_omit_default_content_length(&self) -> bool

Returns true if the runtime must not insert a default Content-Length header.

Implementors§