pub struct CanisterHttpRequestArgument {
pub url: String,
pub max_response_bytes: Option<u64>,
pub method: HttpMethod,
pub headers: Vec<HttpHeader>,
pub body: Option<Vec<u8>>,
pub transform: Option<TransformContext>,
}๐Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.Expand description
Argument type of super::http_request.
Fieldsยง
ยงurl: String๐Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.The requested URL.
max_response_bytes: Option<u64>๐Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.The maximal size of the response in bytes. If None, 2MiB will be the limit. This value affects the cost of the http request and it is highly recommended to set it as low as possible to avoid unnecessary extra costs. See also the pricing section of HTTP outcalls documentation.
method: HttpMethod๐Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.The method of HTTP request.
headers: Vec<HttpHeader>๐Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.List of HTTP request headers and their corresponding values.
body: Option<Vec<u8>>๐Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.Optionally provide request body.
transform: Option<TransformContext>๐Deprecated since 0.18.0: The
api::management_canister::http_request module is deprecated. Please use the management_canister module at the crate root.Name of the transform function which is func (transform_args) -> (http_response) query.
Set to None if you are using http_request_with or http_request_with_cycles_with.
Trait Implementationsยง
Sourceยงimpl Clone for CanisterHttpRequestArgument
impl Clone for CanisterHttpRequestArgument
Sourceยงfn clone(&self) -> CanisterHttpRequestArgument
fn clone(&self) -> CanisterHttpRequestArgument
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 moreSourceยงimpl Debug for CanisterHttpRequestArgument
impl Debug for CanisterHttpRequestArgument
Sourceยงimpl Default for CanisterHttpRequestArgument
impl Default for CanisterHttpRequestArgument
Sourceยงfn default() -> CanisterHttpRequestArgument
fn default() -> CanisterHttpRequestArgument
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl<'de> Deserialize<'de> for CanisterHttpRequestArgument
impl<'de> Deserialize<'de> for CanisterHttpRequestArgument
Sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Sourceยงimpl PartialEq for CanisterHttpRequestArgument
impl PartialEq for CanisterHttpRequestArgument
Sourceยงfn eq(&self, other: &CanisterHttpRequestArgument) -> bool
fn eq(&self, other: &CanisterHttpRequestArgument) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CanisterHttpRequestArgument
impl StructuralPartialEq for CanisterHttpRequestArgument
Auto Trait Implementationsยง
impl Freeze for CanisterHttpRequestArgument
impl RefUnwindSafe for CanisterHttpRequestArgument
impl Send for CanisterHttpRequestArgument
impl Sync for CanisterHttpRequestArgument
impl Unpin for CanisterHttpRequestArgument
impl UnwindSafe for CanisterHttpRequestArgument
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