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: String
The requested URL.
max_response_bytes: Option<u64>
The maximal size of the response in bytes. If None, 2MiB will be the limit.
method: HttpMethod
The 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