Skip to main content

parse_http_response_bytes

Function parse_http_response_bytes 

Source
pub fn parse_http_response_bytes(
    response: &[u8],
) -> Result<(u16, String, BTreeMap<String, String>, Vec<u8>), &'static str>
Expand description

parse_http_response のバイト保存版。ヘッダ部分は ASCII 前提で文字列化するが、 ボディは extract_http_body_binary の chunked 復号をそのまま使い、ロスの無い 生バイト列で返す(画像/zip 等のバイナリダウンロード向け)。 戻り値: (status_code, reason, headers, body_bytes)