-
Notifications
You must be signed in to change notification settings - Fork 4
Minor change to replace reqwest by ureq #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
e2c535a
4261b5f
81d528d
9766858
00e3e95
6560677
d227eb0
8923084
d193cb9
5c1cb78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,7 +7,7 @@ use anyhow::{Context, Ok, Result, anyhow}; | |||||||
| use biocrs::biocache::BioCache; | ||||||||
| use biocrs::models::{NewResource, Resource}; | ||||||||
|
|
||||||||
| use reqwest::blocking::get; | ||||||||
| use ureq::get; | ||||||||
| use std::fs::{File, create_dir_all, read_dir, remove_dir, remove_file}; | ||||||||
| use std::io::{BufRead, BufReader, Error, ErrorKind, Write}; | ||||||||
| use std::path::{Path, PathBuf}; | ||||||||
|
|
@@ -367,7 +367,12 @@ impl BBClient { | |||||||
| fn download_bedset_data(&self, bedset_id: &str) -> Result<Vec<String>> { | ||||||||
| let bedset_url = format!("{}/v1/bedset/{}/bedfiles", self.bedbase_api, bedset_id); | ||||||||
|
|
||||||||
| let response = get(&bedset_url)?.text()?; | ||||||||
| let response = get(&bedset_url) | ||||||||
| .call() | ||||||||
| .map_err(|e| anyhow!("Failed to GET {}: {}", bedset_url, e))? | ||||||||
| .body_mut() | ||||||||
| .read_to_string() | ||||||||
|
Comment on lines
+373
to
+374
|
||||||||
| .body_mut() | |
| .read_to_string() | |
| .into_string() |
Uh oh!
There was an error while loading. Please reload this page.