pub struct HttpProtocol {
pub version: HttpVersion,
pub persistent_connections: bool,
pub max_pipeline: usize,
}Expand description
HTTP/1.1, HTTP/2, HTTP/3 protocol handler with persistent connection management
Fields§
§version: HttpVersion§persistent_connections: bool§max_pipeline: usizeImplementations§
Source§impl HttpProtocol
impl HttpProtocol
pub fn new() -> Self
Sourcepub fn build_request(
&self,
method: &str,
url: &str,
headers: &BTreeMap<String, String>,
body: &[u8],
) -> Vec<u8> ⓘ
pub fn build_request( &self, method: &str, url: &str, headers: &BTreeMap<String, String>, body: &[u8], ) -> Vec<u8> ⓘ
Construct RFC 7230 compliant HTTP request
Sourcepub fn parse_response(
&self,
data: &[u8],
) -> Result<ParsedResponse, ProtocolError>
pub fn parse_response( &self, data: &[u8], ) -> Result<ParsedResponse, ProtocolError>
Parse HTTP response according to RFC 7230 specification