pub(crate) fn http_get_with_params<T>(
    api_key: &str,
    user_agent: &str,
    url: &str,
    query_params: &[(&str, &str)],
) -> VtResult<T>
where
    T: DeserializeOwned,
{
    let client = Client::builder().user_agent(user_agent).build()?;
    let resp = client
        .get(url)
        .header("x-apikey", api_key)
        .header("Accept", "application/json")
        .query(query_params)
        .send()?;
    process_resp(resp)
}
/// GET from a URL with query params
GET from a URL with query params
GET from a URL with query params
pub(crate) fn http_get_with_params<T>(
    api_key: &str,
    user_agent: &str,
    url: &str,
    query_params: &[(&str, &str)],
) -> VtResult<T>
where
    T: DeserializeOwned,
{
    let client = Client::builder().user_agent(user_agent).build()?;
    let resp = client
        .get(url)
        .header("x-apikey", api_key)
        .header("Accept", "application/json")
        .query(query_params)
        .send()?;
    process_resp(resp)
}
pub ( crate ) fn http_get_with_params < T > ( api_key : & str , user_agent : & str , url : & str , query_params : & [ ( & str , & str ) ] , ) -> VtResult < T > where T : DeserializeOwned , { let client = Client :: builder ( ) . user_agent ( user_agent ) . build ( ) ? ; let resp = client . get ( url ) . header ( " " , api_key ) . header ( " " , " " ) . query ( query_params ) . send ( ) ? ; process_resp ( resp ) }
GET from a URL with query params
GET from a URL with query params
api_key
&str
user_agent
&str
url
&str
query_params
&[(&str, &str)]