Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCWCD Hints #19

 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HTTP HEAD method is a GET method, the only difference is that it returns only the header and not the body. So you can override doGET when your HTTP method is HEAD.Is this correct?We still have to override doHead right?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We still have to override doHead right?

Yes, you still need to override doHead. doGet will not be invoked.
 
Joe Harry
Ranch Hand
Posts: 10083
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don;'t think so that we have to explicitly override doHead if we have doGet overridden...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, my mistake. I'll remember that one.

doGet
Overriding this method to support a GET request also automatically supports
an HTTP HEAD request. A HEAD request is a GET request that returns no
body in the response, only the request header fields.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic