pub trait HttpContext: BaseContext {
    // Provided methods
    fn on_http_request_headers(
        &mut self,
        headers: &RequestHeaders
    ) -> FilterHeadersStatus { ... }
    fn on_http_request_body(&mut self, body: &RequestBody) -> FilterDataStatus { ... }
    fn on_http_request_trailers(
        &mut self,
        trailers: &RequestTrailers
    ) -> FilterTrailersStatus { ... }
    fn on_http_response_headers(
        &mut self,
        headers: &ResponseHeaders
    ) -> FilterHeadersStatus { ... }
    fn on_http_response_body(&mut self, body: &ResponseBody) -> FilterDataStatus { ... }
    fn on_http_response_trailers(
        &mut self,
        trailers: &ResponseTrailers
    ) -> FilterTrailersStatus { ... }
}
Expand description

Context for a HTTP filter plugin.

Provided Methods§

source

fn on_http_request_headers( &mut self, headers: &RequestHeaders ) -> FilterHeadersStatus

Called one or more times as the proxy receives request headers. If headers.end_of_stream() is true, then they are the last request headers.

source

fn on_http_request_body(&mut self, body: &RequestBody) -> FilterDataStatus

Called only if and only if there is a request body. Called one or more times as the proxy receives blocks of request body data. If body.end_of_stream() is true, it is the last block.

source

fn on_http_request_trailers( &mut self, trailers: &RequestTrailers ) -> FilterTrailersStatus

Called once if and only if any trailers are sent at the end of the request. Not called multiple times.

source

fn on_http_response_headers( &mut self, headers: &ResponseHeaders ) -> FilterHeadersStatus

Called one or more times as the proxy receives response headers. If headers.end_of_stream() is true, then they are the last response headers.

source

fn on_http_response_body(&mut self, body: &ResponseBody) -> FilterDataStatus

Called only if and only if there is a response body. Called one or more times as the proxy receives blocks of response body data. If body.end_of_stream() is true, it is the last block.

source

fn on_http_response_trailers( &mut self, trailers: &ResponseTrailers ) -> FilterTrailersStatus

Called once if and only if any trailers are sent at the end of the response. Not called multiple times.

Implementors§