reqwest streams for Rust
Library provides HTTP response streaming support for reqwest:
- JSON array stream format
- JSON lines stream format
- CSV stream
- Protobuf len-prefixed stream format
This type of responses are useful when you are reading huge stream of objects from some source (such as database, file, etc) and want to avoid huge memory allocation.
Quick start
Cargo.toml:
[]
= { = "0.5", =["json", "csv", "protobuf"] }
Example code:
use *;
use BoxStream;
use ;
async
All examples available in examples directory.
To run example use:
# cargo run --example json-stream
Need server support?
There is the same functionality:
Licence
Apache Software License (ASL)
Author
Abdulla Abdurakhmanov