This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • 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
Pie
Posts: 20768
30
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: 64631
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic