/// POST to a URL with data in the body
POST to a URL with data in the body
POST to a URL with data in the body
pub(crate) fn http_body_post<S, T>(
    api_key: &str,
    user_agent: &str,
    url: &str,
    data: S,
) -> VtResult<T>
where
    S: Serialize,
    T: DeserializeOwned,
{
    let client = Client::builder().user_agent(user_agent).build()?;
    let resp = client
        .post(url)
        .header("x-apikey", api_key)
        .json(&data)
        .send()?;
    process_resp(resp)
}
pub ( crate ) fn http_body_post < S , T > ( api_key : & str , user_agent : & str , url : & str , data : S , ) -> VtResult < T > where S : Serialize , T : DeserializeOwned , { let client = Client :: builder ( ) . user_agent ( user_agent ) . build ( ) ? ; let resp = client . post ( url ) . header ( " " , api_key ) . json ( & data ) . send ( ) ? ; process_resp ( resp ) }
POST to a URL with data in the body
POST to a URL with data in the body
api_key
&str
<not_specific>
user_agent
&str
<not_specific>
url
&str
<not_specific>
data
S
<not_specific>