feignhttp 0.3.1

Declarative HTTP client for rust
Documentation
1
2
3
4
5
6
7
8
9
use std::collections::HashMap;

pub fn replace_url(url: &str, map: &HashMap<&str, String>) -> String {
    let mut url = url.to_string();
    for (k, v) in map {
        url = url.replace(("{".to_string() + k + "}").as_str(), &v);
    }
    url
}