Struct http_mel::client::HttpClient
source · pub struct HttpClient { /* private fields */ }Expand description
HTTP client for general use
The HTTP client provides configuration for HTTP requests. All the default parameters are set up as good trade-off for general use.
base_url: The base URL for a client. All request URLs will be relative to this URL. ℹ️ Note: a trailing slash is significant. Without it, the last path component is considered to be a “file” name to be removed to get at the “directory” that is used as the base.keep_alive: HTTP 1.1keep-alive, for connection pooling.max_connections_per_host: Maximum number of simultaneous connections that the client is allowed to keep open to individual hosts at one time.tcp_no_delay: TCPNO_DELAYfield.timeout: Connection timeout duration.
Implementations§
source§impl HttpClient
impl HttpClient
pub fn initialization(&self)
pub async fn manage_request( &self, request: Request, data: Option<&dyn Output>, failure: &dyn Output, is_error: &dyn Output, is_success: &dyn Output, http_code: &dyn Output, http_status: &dyn Output )
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe for HttpClient
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.