mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-08 07:37:45 +00:00
Switch to ureq
This commit is contained in:
parent
bb8273bab4
commit
91746908a1
4 changed files with 103 additions and 196 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue