Here is a working example:
    
    
    import httpclient, json
    
    let client = newHttpClient()
    client.headers = newHttpHeaders({ "Content-Type": "application/json",
                                      "x-mashape-proxy-secret": "asdfgqwert",
                                      "x-mashape-User": "asd"})
    
    let body = %*{
        "data": "some text"
    }
    
    var resp = 
client.request("http://127.0.0.1:5000/region?country=xx&area-code=17";, 
httpMethod = HttpGet, body = $body)
    

Reply via email to