Skip to main content

post

Function post 

Source
pub fn post<IN, OUT>(
    url: &str,
    api_secret: Option<String>,
    input: &IN,
    timeout: TimeOut,
) -> Result<OUT, Error>
where IN: Serialize, for<'de> OUT: Deserialize<'de>,
Expand description

Helper function to easily issue a HTTP POST request with the provided JSON object as body on a given URL that returns a JSON object. Handles request building, JSON serialization and deserialization, and response code checking.