15 ms·
Not a knock against Rust or the lib or the example but I've always hated the technique of naming a function with a verb but that function only constructs an obj
by msie 12y ago
Not a knock against Rust or the lib or the example but I've always hated the technique of naming a function with a verb but that function only constructs an object. For example, one would think that get() "gets something" but it appears to construct an http request object that you call send() on.
let mut res = client.get("http://localhost:3000/").send().unwrap();
Unless you have some experience with creating routes, you can't immediately tell what the following does:
router.get("/", hello_world);
router.post("/set", set_greeting);