rest-json-client

Crates.iorest-json-client
lib.rsrest-json-client
version0.2.4
created_at2023-09-28 09:52:06.878536+00
updated_at2025-06-29 07:59:00.484352+00
descriptionUtility library for easing http json api request
homepage
repositoryhttps://github.com/paulusminus/rest-api-client
max_upload_size
id985753
size59,298
Paul Min (paulusminus)

documentation

README

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>(())
# });
Commit count: 147

cargo fmt