We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87189a2 commit 87c0320Copy full SHA for 87c0320
src/main.rs
@@ -96,12 +96,12 @@ fn main() {
96
);
97
98
let json = serde_json::to_string(&reading).unwrap();
99
- let url = "http://localhost:4000/api/readings/add";
+ const URL: &str = "http://localhost:4000/api/readings/add";
100
101
- println!("Sending POST request to {} as JSON: {}", url, json);
+ println!("Sending POST request to {} as JSON: {}", URL, json);
102
103
let client = Client::new();
104
- let res = client.post(url)
+ let res = client.post(URL)
105
.body(json)
106
.send();
107
0 commit comments