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>,
}Expand description
Argument type of http_request.
Fields§
§url: StringThe requested URL.
max_response_bytes: Option<u64>The maximal size of the response in bytes. If None, 2MiB will be the limit.
method: HttpMethodThe method of HTTP request.
headers: Vec<HttpHeader>List of HTTP request headers and their corresponding values.
body: Option<Vec<u8>>Optionally provide request body.
transform: Option<TransformContext>Name of the transform function which is func (transform_args) -> (http_response) query.
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<'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<CanisterHttpRequestArgument> for CanisterHttpRequestArgument
impl PartialEq<CanisterHttpRequestArgument> for CanisterHttpRequestArgument
source§fn eq(&self, other: &CanisterHttpRequestArgument) -> bool
fn eq(&self, other: &CanisterHttpRequestArgument) -> bool
This method tests for
self and other values to be equal, and is used
by ==.