Skip to content

Redirects within Poem OpenAPI #225

Answered by sunli829
ChillFish8 asked this question in Q&A
Discussion options

You must be logged in to vote

You can define a 301 response with the ApiResponse macro. 🙂

#[derive(ApiResponse)]
enum MyResponse {
    #[oai(status = "301")]
    Redirect(#[oai(header = "Location")] String)
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ChillFish8
Comment options

Answer selected by ChillFish8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants