• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sendRedirect method

 
Derek Nahabedian
Greenhorn
Posts: 3
Eclipse IDE Java jQuery
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand when a sendRedirect is executed, a 301 or 302 response is sent to the client, along with the desired URL. The browser then issues a new request for the desired URL.

My question is what HTTP method is generated under the hood? Get or Post?
Can a Get / Post be specified?

Thank you
 
Paul Clapham
Sheriff
Posts: 20990
31
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The browser will generate a new Get request in response to your 300-sequence response. You don't have any choice about that.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And thank goodness. It's what enables the P-R-G pattern!
 
Derek Nahabedian
Greenhorn
Posts: 3
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you both - I am reading up on the PRG pattern.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic