use Url;
/// Update query params without remove old query params. If the
/// given parameter name non-exists it will append end of the
/// query otherwise it's value will be updated
///
/// # Examples
///
/// ```
/// use subscan::utilities::http::update_url_query;
/// use reqwest::Url;
///
/// let mut url: Url = "https://foo.com".parse().unwrap();
///
/// update_url_query(&mut url, "a".into(), "b".into());
/// assert_eq!(url.to_string(), "https://foo.com/?a=b");
///
/// // does not override old `a` parameter
/// update_url_query(&mut url, "x".into(), "y".into());
/// assert_eq!(url.to_string(), "https://foo.com/?a=b&x=y");
///
/// update_url_query(&mut url, "a".into(), "c".into());
/// assert_eq!(url.to_string(), "https://foo.com/?x=y&a=c");
/// ```