I am having a bit of trouble related to this crate and can't seem to find any examples of making it work. I found a good example using the get method but apparently the post method doesn't return a result type and I"m not sure how to handle it.
The rust docs read:
let params = [("foo", "bar"), ("baz", "quux")];
let client = reqwest::Client::new();
let res = client.post("http://httpbin.org/post")
The first issue is the ? at the end gives error messages and removing it seems to let it work. I can compile and run with no errors. However, I have no idea whether it is working or not because I can't seem to get anything back from res variable.
If I attempt to do something with res.Status() it says no method exists and if I try to put inside match statement it says it is not a proper response for that.
Does anyone have a real world example of making a post call and receiving back a response as well as dealing with error conditions?