pub struct HttpConnection<IN>where
IN: ArrayLength<u8>,{ /* private fields */ }
Expand description
An HTTP connection.
Implementations§
Source§impl<IN> HttpConnection<IN>where
IN: ArrayLength<u8>,
impl<IN> HttpConnection<IN>where
IN: ArrayLength<u8>,
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new instance.
Note: The connection does not establish a new connection on e.g. a TCP stack. It more manages the state of an HTTP connection.
Sourcepub fn begin<'req>(
self,
method: &'static str,
path: &'static str,
) -> RequestBuilder<'req, IN, NoOpResponseHandler>
pub fn begin<'req>( self, method: &'static str, path: &'static str, ) -> RequestBuilder<'req, IN, NoOpResponseHandler>
Begin a new HTTP request.
The request will only be sent to the sink (server) when one of the “execute” functions is being invoked.
Sourcepub fn post<'req>(
self,
path: &'static str,
) -> RequestBuilder<'req, IN, NoOpResponseHandler>
pub fn post<'req>( self, path: &'static str, ) -> RequestBuilder<'req, IN, NoOpResponseHandler>
Begin a new POST HTTP request.
Auto Trait Implementations§
impl<IN> Freeze for HttpConnection<IN>
impl<IN> RefUnwindSafe for HttpConnection<IN>
impl<IN> Send for HttpConnection<IN>
impl<IN> Sync for HttpConnection<IN>
impl<IN> Unpin for HttpConnection<IN>
impl<IN> UnwindSafe for HttpConnection<IN>
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