Experiment with caching

This commit is contained in:
Robin
2021-01-23 10:48:33 +01:00
parent baf7272cfd
commit 077c222a4e
7 changed files with 108 additions and 8 deletions

@ -37,7 +37,7 @@ pub async fn item(req: HttpRequest) -> HttpResponse {
dbg!(req.match_info().get("id").unwrap_or(""));
// Send a request to the url, receive JSON in response
match request(&path).await {
match request(path).await {
// Otherwise, grab the JSON output from the request
Ok(res) => {
// Parse the JSON into Post and Comment structs