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 885f9d2 commit e0b7dceCopy full SHA for e0b7dce
src/lib.rs
@@ -20,7 +20,10 @@ const URL: &str = "https://mempool.space/api";
20
/// `pub fn blocking(api: &String) -> Result<&str>`
21
pub fn blocking(api: &String) -> Result<&str> {
22
let call = format!("{}/{}", URL, api);
23
- let mut body = ureq::get(&call).call().expect("calls to blocking(api: &String) needs to include /v1/<api_endpoint> in some cases.").into_reader();
+ let mut body = ureq::get(&call)
24
+ .call()
25
+ .expect("calls to blocking(api: &String) needs to include /v1/<api_endpoint> in some cases.")
26
+ .into_reader();
27
let mut buf = Vec::new();
28
body.read_to_end(&mut buf).unwrap();
29
let text = match std::str::from_utf8(&buf) {
0 commit comments