python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How to redirect if a guard fail
I'm using a guard to authenticated a user.
How can i easily redirect the user to the login page if a guard fail (redirect to /login in my example) ?
#[rocket::async_trait]
impl<'r> FromRequest&l...
Poxy
Votes: 0
Answers: 2
Custom openapi schema with rust, rocket and okapi
I am developing an API with Rust, using Rocket as main framework.
To create the Swagger docs I use Okapi, which allows me to create the docs automatically.
use rocket_okapi::swagger_ui::*;
extern crat...

Emille C.
Votes: 0
Answers: 0
How to test two parallel transactions in Rust SQLx?
I'm experimenting with Rocket, Rust and SQLx and I'd like to test what happens when two parallel transactions try to insert a duplicated record on my table.
My insert fn contains nothing special and i...
André
Votes: 0
Answers: 2
How to catch all routes in rocket?
I have looked up everywhere but I only found this github issue, but it's from 5 years ago, and rocket has changed a lot.
Is there a way to catch all methods (get, post, head, options, whatever .. .) a...
Chandan
Votes: 0
Answers: 1