Struct windows::Web::Http::HttpClient
pub struct HttpClient(/* private fields */);
Implementations§
§impl HttpClient
impl HttpClient
pub fn new() -> Result<Self>
pub fn Close(&self) -> Result<()>
pub fn DeleteAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn GetAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn GetWithOptionAsync<P0>(
&self,
uri: P0,
completionoption: HttpCompletionOption
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn GetBufferAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<IBuffer, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn GetInputStreamAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<IInputStream, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn GetStringAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<HSTRING, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn PostAsync<P0, P1>(
&self,
uri: P0,
content: P1
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: IntoParam<Uri>,
P1: IntoParam<IHttpContent>,
pub fn PutAsync<P0, P1>(
&self,
uri: P0,
content: P1
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: IntoParam<Uri>,
P1: IntoParam<IHttpContent>,
pub fn SendRequestAsync<P0>(
&self,
request: P0
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: IntoParam<HttpRequestMessage>,
pub fn SendRequestWithOptionAsync<P0>(
&self,
request: P0,
completionoption: HttpCompletionOption
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: IntoParam<HttpRequestMessage>,
pub fn DefaultRequestHeaders(&self) -> Result<HttpRequestHeaderCollection>
pub fn TryDeleteAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn TryGetAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn TryGetAsync2<P0>(
&self,
uri: P0,
completionoption: HttpCompletionOption
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn TryGetBufferAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<HttpGetBufferResult, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn TryGetInputStreamAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<HttpGetInputStreamResult, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn TryGetStringAsync<P0>(
&self,
uri: P0
) -> Result<IAsyncOperationWithProgress<HttpGetStringResult, HttpProgress>>where
P0: IntoParam<Uri>,
pub fn TryPostAsync<P0, P1>(
&self,
uri: P0,
content: P1
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: IntoParam<Uri>,
P1: IntoParam<IHttpContent>,
pub fn TryPutAsync<P0, P1>(
&self,
uri: P0,
content: P1
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: IntoParam<Uri>,
P1: IntoParam<IHttpContent>,
pub fn TrySendRequestAsync<P0>(
&self,
request: P0
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: IntoParam<HttpRequestMessage>,
pub fn TrySendRequestAsync2<P0>(
&self,
request: P0,
completionoption: HttpCompletionOption
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: IntoParam<HttpRequestMessage>,
pub fn DefaultPrivacyAnnotation(&self) -> Result<HSTRING>
pub fn SetDefaultPrivacyAnnotation(&self, value: &HSTRING) -> Result<()>
pub fn Create<P0>(filter: P0) -> Result<HttpClient>where
P0: IntoParam<IHttpFilter>,
pub fn ToString(&self) -> Result<HSTRING>
Trait Implementations§
§impl Clone for HttpClient
impl Clone for HttpClient
§fn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for HttpClient
impl Debug for HttpClient
§impl From<&HttpClient> for &IInspectable
impl From<&HttpClient> for &IInspectable
§fn from(value: &HttpClient) -> Self
fn from(value: &HttpClient) -> Self
Converts to this type from the input type.
§impl From<&HttpClient> for &IUnknown
impl From<&HttpClient> for &IUnknown
§fn from(value: &HttpClient) -> Self
fn from(value: &HttpClient) -> Self
Converts to this type from the input type.
§impl From<HttpClient> for IInspectable
impl From<HttpClient> for IInspectable
§fn from(value: HttpClient) -> Self
fn from(value: HttpClient) -> Self
Converts to this type from the input type.
§impl From<HttpClient> for IUnknown
impl From<HttpClient> for IUnknown
§fn from(value: HttpClient) -> Self
fn from(value: HttpClient) -> Self
Converts to this type from the input type.
§impl Interface for HttpClient
impl Interface for HttpClient
§fn as_raw(&self) -> *mut c_void
fn as_raw(&self) -> *mut c_void
Returns the raw COM interface pointer. The resulting pointer continues to be owned by the
Interface
implementation.§fn into_raw(self) -> *mut c_void
fn into_raw(self) -> *mut c_void
Returns the raw COM interface pointer and releases ownership. It the caller’s responsibility to release the COM interface pointer.
§fn cast<T>(&self) -> Result<T, Error>where
T: Interface,
fn cast<T>(&self) -> Result<T, Error>where
T: Interface,
Attempts to cast the current interface to another interface using
QueryInterface
. Read more§impl PartialEq for HttpClient
impl PartialEq for HttpClient
§fn eq(&self, other: &HttpClient) -> bool
fn eq(&self, other: &HttpClient) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HttpClient
impl Send for HttpClient
impl StructuralPartialEq for HttpClient
impl Sync for HttpClient
Auto Trait Implementations§
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