• 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().
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!