Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setStatus() and sendError()

 
Sophie Angela
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between the setStatus() and sendError() methods?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With set status, you set the error code of the response. With send error you actually send the response with that error code. By "error code" I mean a response code, it could also be HTTP OK, which means everything went well.
 
Nandu Jawale
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can write to the response after call to setStatus() while you can't aftre a call to sendError().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic