add new_with_client() constructor that accepts reqwest Client

This commit is contained in:
Joshua M. Clulow 2021-09-15 06:42:32 +00:00
parent 8409a6dced
commit 5e8b9d0e8c
1 changed files with 5 additions and 0 deletions

View File

@ -1075,6 +1075,11 @@ fn gen(api: &OpenAPI, ts: &mut TypeSpace) -> Result<String> {
a(" .build()");
a(" .unwrap();");
a("");
a(" Client::new_with_client(baseurl, client)");
a(" }");
a("");
a(" pub fn new_with_client(baseurl: &str, client: reqwest::Client) \
-> Client {");
a(" Client {");
a(" baseurl: baseurl.to_string(),");
a(" client,");