1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # reqores
//!
//! Oversimplified http request/response abstraction layer for `bot_any` packages.
//!
//! - Simple, lightweight abstraction
//! - Easily exchangeable client/server implementation
//!
//! # Implementations
//!
//! - [reqores-client-surf](https://crates.io/crates/reqores-client-surf) - surf based, async client implementation
//! - [reqores-universal-cf-worker](https://crates.io/crates/reqores-universal-cf-worker) - universal client/server implementation for Cloudflare Workers
//!
//! # Example
//!
//! Define a new [`ClientRequest`] for your web API.
//!
//! ```rust
//! # use serde::{Serialize, Deserialize};
//! # use reqores::{ClientRequest, HttpMethod};
//! #
//! #[derive(Debug, Serialize, Deserialize)]
//! pub struct YourApiResponse { /* ... some fields ... */ }
//!
//! pub struct YourApiCall;
//!
//! impl ClientRequest for YourApiCall {
//! type Response = YourApiResponse;
//!
//! fn url(&self) -> String {
//! "https://example.com/api".to_string()
//! }
//!
//! fn method(&self) -> HttpMethod {
//! HttpMethod::Get
//! }
//! }
//! ```
pub use ;
pub use HttpMethod;
pub use ;
pub use ;