This commit is contained in:
George Miao 2022-10-31 10:37:28 -04:00 committed by Aleksandr
parent 69760035f3
commit 837dbf5421

View File

@ -1,3 +1,9 @@
//! Sharable version of `TransClient`.
//!
//! It lifted the requirement of `&mut self` on
//! all requests methods by using a lock on inner state. This may introduce some overhead
//! so choose as needed.
use std::{ops::Deref, sync::RwLock}; use std::{ops::Deref, sync::RwLock};
use reqwest::{header::CONTENT_TYPE, Client, StatusCode, Url}; use reqwest::{header::CONTENT_TYPE, Client, StatusCode, Url};