6 releases
Uses new Rust 2024
| 0.2.4 | Jun 29, 2025 |
|---|---|
| 0.2.3 | Mar 27, 2024 |
| 0.2.1 | Sep 28, 2023 |
| 0.1.0 | Sep 28, 2023 |
#774 in HTTP server
285 downloads per month
16KB
152 lines
Library to simplify calls to a RESTful API using a JSON file as the data source. GET, POST, PUT and DELETE methods are supported.
Example
Getting a list of posts from Json Placeholder
# use rest_json_client::{ApiClientBuilder, Authentication, Error};
# use json_placeholder_data::posts::Post;
#
# tokio_test::block_on(async {
let base = "https://jsonplaceholder.typicode.com/";
let posts = ApiClientBuilder::new(base)
.build()?
.get::<Vec<Post>>("posts")
.await?;
# assert_eq!(posts.len(), 100);
# Ok::<(), Error>(())
# });
Dependencies
~5–19MB
~198K SLoC