Skip to main content

post

Function post 

Source
pub fn post<T: IntoUri>(uri: T) -> RequestBuilder
Expand description

Shortcut method to quickly make a POST request.

See also the methods on the hpx::RequestBuilder type.

NOTE: This function creates a new internal Client on each call, and so should not be used if making many requests. Create a Client instead.

ยงExamples

let res = hpx::post("https://httpbin.org/post")
    .body("example body")
    .send()
    .await?;