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 cf73b6e commit 9477838Copy full SHA for 9477838
src/main.rs
@@ -1120,9 +1120,15 @@ impl Executor {
1120
// Send the http request
1121
"request" => {
1122
let url = self.pop_stack().get_string();
1123
- self.stack.push(Type::String(
1124
- reqwest::blocking::get(url).unwrap().text().unwrap(),
1125
- ));
+ match reqwest::blocking::get(url) {
+ Ok(i) => self
+ .stack
1126
+ .push(Type::String(i.text().unwrap_or("".to_string()))),
1127
+ Err(e) => {
1128
+ self.log_print(format!("Error! {e}\n"));
1129
+ self.stack.push(Type::Error("request".to_string()))
1130
+ }
1131
1132
}
1133
1134
// Open the file or url
0 commit comments