Igosuki / binance-rs-async

Async client for the Binance APIs
https://crates.io/crates/binance-rs-async
Other
184 stars 113 forks source link

The GET method internally creates a new `reqwest::Client` each time. #50

Closed seongs1024 closed 1 year ago

seongs1024 commented 1 year ago

https://github.com/Igosuki/binance-rs-async/blob/555577f61b17863922d9ea7b13f21291f1e0aac1/src/client.rs#L104-L112

Unlike other request methods, the get() method applys reqwest::get() shortcut method. According to reqwest docs, this may lead to performace issues. So it seems like a good idea to use the inner.get() method consistently. Like below:

     let response = self.inner.get(&url).send().await?;