Switch to ureq

This commit is contained in:
spikecodes 2021-01-11 10:33:48 -08:00
parent bb8273bab4
commit 91746908a1
4 changed files with 103 additions and 196 deletions

View file

@ -49,7 +49,7 @@ pub async fn profile(req: HttpRequest) -> HttpResponse {
// USER
async fn user(name: &str) -> Result<User, &'static str> {
// Build the Reddit JSON API path
let path: String = format!("user/{}/about.json", name);
let path: String = format!("/user/{}/about.json", name);
// Send a request to the url
match request(&path).await {