dom96 / jester

A sinatra-like web framework for Nim.
MIT License
1.57k stars 120 forks source link

Custom httpStatusCode in redirect() #324

Closed ThomasTJdev closed 8 months ago

ThomasTJdev commented 1 year ago

This allows the user to specify the redirect type.

Current solution Currently it only allow for Http303 redirects.

After PR This PR allows the user to specify the http status code:

redirect("/") # default 303
redirect("/", httpStatusCode = Http301)
redirect("/", httpStatusCode = Http302)
redirect("/", httpStatusCode = Http303)