ehttp 0.7.1

Minimal HTTP client for both native and WASM
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::types::PartialResponse;

/// A piece streamed by [`crate::streaming::fetch`].
pub enum Part {
    /// The header of the response.
    ///
    /// The `on_data` callback receives this only once.
    Response(PartialResponse),

    /// A single chunk of the response data.
    ///
    /// If the chunk is empty, that means the `on_data` callback will not receive any more data.
    Chunk(Vec<u8>),
}