Interface HttpResponse
-
- All Known Implementing Classes:
ServletHttpResponse
public interface HttpResponseRepresents an outgoing HTTP response and the contract to manipulate it.- Author:
- Pedro Igor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsendError(int statusCode)Send an error with the givenstatusCode.voidsendError(int statusCode, String reason)Send an error with the givenstatusCodeandreasonmessage.voidsetHeader(String name, String value)Set a header with the givennameandvalue.
-
-
-
Method Detail
-
sendError
void sendError(int statusCode)
Send an error with the givenstatusCode.- Parameters:
statusCode- the status to set in the response
-
sendError
void sendError(int statusCode, String reason)Send an error with the givenstatusCodeandreasonmessage.- Parameters:
statusCode- the status to set in the response
-
-