Restep can create highly readable APIClient.
Automatically generates the endpoint()
function that returns the specified endpoint.
```rust use restep::endpoint;
fn simple() -> String {
// You can use fn endpoint() -> String
in this function.
endpoint()
}
assert_eq!(simple(), "/customers");
```
```rust use restep::endpoint;
struct PathParameters { customer_id: i32, }
fn dynamicroute() -> String {
let params = PathParameters { customerid: 1 };
// You can use fn endpoint(params: &PathParameters) -> String
in this function.
endpoint(¶ms)
}
asserteq!(dynamicroute(), "/customers/1");
```
```rust use restep::endpoint;
struct Customer { id: i32, name: String, }
struct APIClient { client: reqwest::Client, }
struct PathParameters { customer_id: i32, }
impl APIClient {
#[endpoint("/customer/{customerid}", params = "PathParameters")]
async fn getcustomer(&self, params: PathParameters) -> anyhow::Result