pub struct UreqHttpClient {
pub server_url: String,
pub global_timeout: Option<Duration>,
}Expand description
Http client implementation relying on ureq.
Fields§
§server_url: StringThe base url of the HTTP server to reach.
Used as base url when calling UreqHttpClient::get method.
global_timeout: Option<Duration>The timeout for the entire HTTP call.
Trait Implementations§
Source§impl Default for UreqHttpClient
impl Default for UreqHttpClient
Source§fn default() -> UreqHttpClient
fn default() -> UreqHttpClient
Returns the “default value” for a type. Read more
Source§impl HttpClient for UreqHttpClient
impl HttpClient for UreqHttpClient
Source§fn get(&self, url: &str) -> Result<String, ProgramExit>
fn get(&self, url: &str) -> Result<String, ProgramExit>
Make a GET HTTP call using a ureq client.
The server base url (i.e. https://localhost:8080) should be provided as part of `UreqHttpClient::server_url field.
See HttpClient::get for more infos.
Auto Trait Implementations§
impl Freeze for UreqHttpClient
impl RefUnwindSafe for UreqHttpClient
impl Send for UreqHttpClient
impl Sync for UreqHttpClient
impl Unpin for UreqHttpClient
impl UnwindSafe for UreqHttpClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more