pub trait HttpFilterInstance {
// Provided methods
fn request_headers(
&mut self,
_request_headers: &RequestHeaders,
_end_of_stream: bool,
) -> RequestHeadersStatus { ... }
fn request_body(
&mut self,
_request_body_frame: &RequestBodyBuffer,
_end_of_stream: bool,
) -> RequestBodyStatus { ... }
fn response_headers(
&mut self,
_response_headers: &ResponseHeaders,
_end_of_stream: bool,
) -> ResponseHeadersStatus { ... }
fn response_body(
&mut self,
_response_body_frame: &ResponseBodyBuffer,
_end_of_stream: bool,
) -> ResponseBodyStatus { ... }
fn destroy(&mut self) { ... }
}Expand description
HttpFilterInstance is a trait that represents each HTTP request.
This is created for each new HTTP request and is destroyed when the request is completed.
Provided Methods§
Sourcefn request_headers(
&mut self,
_request_headers: &RequestHeaders,
_end_of_stream: bool,
) -> RequestHeadersStatus
fn request_headers( &mut self, _request_headers: &RequestHeaders, _end_of_stream: bool, ) -> RequestHeadersStatus
This is called when request headers are received. The function should return the status of the operation.
request_headersis the reference to the request headers map.end_of_streamis a boolean that indicates if this is the headers-only request.
Sourcefn request_body(
&mut self,
_request_body_frame: &RequestBodyBuffer,
_end_of_stream: bool,
) -> RequestBodyStatus
fn request_body( &mut self, _request_body_frame: &RequestBodyBuffer, _end_of_stream: bool, ) -> RequestBodyStatus
This is called when request body data is received. The function should return the status of the operation.
_request_body_frameis the reference to the newly arrived request body frame.end_of_streamis a boolean that indicates if this is the last data frame.
Sourcefn response_headers(
&mut self,
_response_headers: &ResponseHeaders,
_end_of_stream: bool,
) -> ResponseHeadersStatus
fn response_headers( &mut self, _response_headers: &ResponseHeaders, _end_of_stream: bool, ) -> ResponseHeadersStatus
This is called when response headers are received. The function should return the status of the operation.
response_headersis the reference to the response headers map.end_of_streamis a boolean that indicates if this is the headers-only response.
Sourcefn response_body(
&mut self,
_response_body_frame: &ResponseBodyBuffer,
_end_of_stream: bool,
) -> ResponseBodyStatus
fn response_body( &mut self, _response_body_frame: &ResponseBodyBuffer, _end_of_stream: bool, ) -> ResponseBodyStatus
This is called when response body data is received. The function should return the status of the operation.
_response_body_frameis the reference to the newly arrived response body frame.end_of_streamis a boolean that indicates if this is the last data frame.