public
Last active

Of redirects

  • Download Gist
Of redirects
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// format: html, POST /register, dev calls setRedirectRoute('welcome')
 
302 => /welcome, browser redirects, gets a new page
 
// format: json, POST /register, dev calls setRedirectRoute('welcome')
 
302 => /welcome, browser redirects, /welcome returns a 200 with {"some json shit"}, ajax callback gets json
 
// format: html, GET|POST /anypage, dev calls setRedirectUri('http://google.com/FUUUUU')
 
302 => http://google.com/FUUUUU
 
// format: json, GET|POST /anypage, dev calls setRedirectUri('http://google.com/FUUUUU')
 
302 => http://google.com/FUUUUU + Response body is: {"status":"302","location":"http://google.com/FUUUUU"}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.