• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

sendRedirect method  RSS feed

 
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
 
Sheriff
Posts: 23714
50
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.
 
Author and ninkuma
Marshal
Posts: 66827
169
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
Boost this thread!