Crate rest_json_client

Source
Expand description

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

    let base = "https://jsonplaceholder.typicode.com/";
    let posts = ApiClientBuilder::new(base)
        .build()?
        .get::<Vec<Post>>("posts")
        .await?;

Structs§

ApiClient
Before one can do any api request, an ApiClient must be constructed
ApiClientBuilder
BasicAuthentication
Error
The Errors that may occur when processing a Request.

Enums§

Authentication
This library support two ways of authentication Either Basic of Bearer