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: Param<Uri>,
pub fn GetAsync<P0>(
&self,
uri: P0,
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: Param<Uri>,
pub fn GetWithOptionAsync<P0>(
&self,
uri: P0,
completionoption: HttpCompletionOption,
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: Param<Uri>,
pub fn GetBufferAsync<P0>(
&self,
uri: P0,
) -> Result<IAsyncOperationWithProgress<IBuffer, HttpProgress>>where
P0: Param<Uri>,
pub fn GetInputStreamAsync<P0>(
&self,
uri: P0,
) -> Result<IAsyncOperationWithProgress<IInputStream, HttpProgress>>where
P0: Param<Uri>,
pub fn GetStringAsync<P0>(
&self,
uri: P0,
) -> Result<IAsyncOperationWithProgress<HSTRING, HttpProgress>>where
P0: Param<Uri>,
pub fn PostAsync<P0, P1>(
&self,
uri: P0,
content: P1,
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: Param<Uri>,
P1: Param<IHttpContent>,
pub fn PutAsync<P0, P1>(
&self,
uri: P0,
content: P1,
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: Param<Uri>,
P1: Param<IHttpContent>,
pub fn SendRequestAsync<P0>(
&self,
request: P0,
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: Param<HttpRequestMessage>,
pub fn SendRequestWithOptionAsync<P0>(
&self,
request: P0,
completionoption: HttpCompletionOption,
) -> Result<IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress>>where
P0: Param<HttpRequestMessage>,
pub fn DefaultRequestHeaders(&self) -> Result<HttpRequestHeaderCollection>
pub fn TryDeleteAsync<P0>(
&self,
uri: P0,
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: Param<Uri>,
pub fn TryGetAsync<P0>(
&self,
uri: P0,
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: Param<Uri>,
pub fn TryGetAsync2<P0>(
&self,
uri: P0,
completionoption: HttpCompletionOption,
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: Param<Uri>,
pub fn TryGetBufferAsync<P0>(
&self,
uri: P0,
) -> Result<IAsyncOperationWithProgress<HttpGetBufferResult, HttpProgress>>where
P0: Param<Uri>,
pub fn TryGetInputStreamAsync<P0>(
&self,
uri: P0,
) -> Result<IAsyncOperationWithProgress<HttpGetInputStreamResult, HttpProgress>>where
P0: Param<Uri>,
pub fn TryGetStringAsync<P0>(
&self,
uri: P0,
) -> Result<IAsyncOperationWithProgress<HttpGetStringResult, HttpProgress>>where
P0: Param<Uri>,
pub fn TryPostAsync<P0, P1>(
&self,
uri: P0,
content: P1,
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: Param<Uri>,
P1: Param<IHttpContent>,
pub fn TryPutAsync<P0, P1>(
&self,
uri: P0,
content: P1,
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: Param<Uri>,
P1: Param<IHttpContent>,
pub fn TrySendRequestAsync<P0>(
&self,
request: P0,
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: Param<HttpRequestMessage>,
pub fn TrySendRequestAsync2<P0>(
&self,
request: P0,
completionoption: HttpCompletionOption,
) -> Result<IAsyncOperationWithProgress<HttpRequestResult, HttpProgress>>where
P0: Param<HttpRequestMessage>,
pub fn DefaultPrivacyAnnotation(&self) -> Result<HSTRING>
pub fn SetDefaultPrivacyAnnotation(&self, value: &HSTRING) -> Result<()>
pub fn Create<P0>(filter: P0) -> Result<HttpClient>where
P0: Param<IHttpFilter>,
pub fn ToString(&self) -> Result<HSTRING>
Trait Implementations§
§impl CanInto<IInspectable> for HttpClient
impl CanInto<IInspectable> for HttpClient
§impl CanInto<IStringable> for HttpClient
impl CanInto<IStringable> for HttpClient
§impl CanInto<IUnknown> for HttpClient
impl CanInto<IUnknown> for HttpClient
§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
§const IID: GUID = <IHttpClient as windows_core::Interface>::IID
const IID: GUID = <IHttpClient as windows_core::Interface>::IID
The
GUID
associated with the interface.§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§fn cast_to_any<T>(&self) -> Result<&(dyn Any + 'static), Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn cast_to_any<T>(&self) -> Result<&(dyn Any + 'static), Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
This casts the given COM interface to [
&dyn Any
]. Read more§fn is_object<T>(&self) -> boolwhere
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn is_object<T>(&self) -> boolwhere
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
§fn cast_object_ref<T>(&self) -> Result<&<T as ComObjectInner>::Outer, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn cast_object_ref<T>(&self) -> Result<&<T as ComObjectInner>::Outer, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
This casts the given COM interface to [
&dyn Any
]. It returns a reference to the “outer”
object, e.g. &MyApp_Impl
, not the inner &MyApp
object. Read more§fn cast_object<T>(&self) -> Result<ComObject<T>, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn cast_object<T>(&self) -> Result<ComObject<T>, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
This casts the given COM interface to [
&dyn Any
]. It returns a reference to the “outer”
object, e.g. MyApp_Impl
, not the inner MyApp
object. Read more§fn downgrade(&self) -> Result<Weak<Self>, Error>
fn downgrade(&self) -> Result<Weak<Self>, Error>
Attempts to create a [
Weak
] reference to this object.§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§
impl Freeze for HttpClient
impl RefUnwindSafe 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)