|
|
|
|
|
by jayy-lmao
1999 days ago
|
|
I've got a few examples of simple web servers within my company, could backport some of it to a public example.
Are you just looking to have something a bit like:
```
#[get('/todo')]
async fn getTodos(...) -> impl Responder {
let todos = reqwest.get('other-api/todos').await?; todos
}
```Obviously this code won't run, just want to gleam the gist of what you want from an example. |
|
If it could do the Error case too that would be cool.
For Rocket, I have something like:
with a But I couldn't quickly get an `async` piece in there so I just sucked it up and synced it all up since it's only backing a Retool dashboard so it isn't the end of the world.So if the example is like:
or the equivalent in the web framework you have that would be hecka useful.