pkoretic / recurse

Qt based micro web framework with middleware design
MIT License
20 stars 2 forks source link

add redirect support #23

Closed pkoretic closed 8 years ago

pkoretic commented 8 years ago

implement response.redirect which returns 302 http code with new url

possible definition

ctx.response.redirect(QUrl path)

examples

ctx.response.redirect("/hello")
ctx.response.redirect("http://www.google.com")

override default 301 status code and body message

ctx.response.redirect("/hello").status(301).body("redirecting...")