reqwest-rest 0.1.0

An opinionated utility to help with creating (and configuring) one-off idiomatic REST API clients.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
reqwest-rest
============

This crate provides `RestClient`, a wrapper around `reqwest-middleware::ClientWithMiddleware` which simplifies
the process of making requests and decoding responses to a typical "REST" http-json API.

Once you have the request and response schema, it becomes simple to implement idiomatic RPC over this,
and do whatever API-specific error interpretation is necessary for your program. The errors retain context
and are easy to understand.

reqwest-retry feature
---------------------

When `reqwest-retry` feature is enabled, the `CommonConfig` object can be used when configuring `reqwest_middleware::ClientWithMiddleware`,
to set up commonly-needed timeouts, and retries with backoff. This is merely for convenience and need not be used
in order to use `RestClient`.