Interface HttpResponse
- All Known Implementing Classes:
ServletHttpResponse
public interface HttpResponse
Represents an outgoing HTTP response and the contract to manipulate it.
- Author:
- Pedro Igor
-
Method Summary
Modifier and TypeMethodDescriptionvoidsendError(int statusCode) Send an error with the givenstatusCode.voidSend an error with the givenstatusCodeandreasonmessage.voidSet a header with the givennameandvalue.
-
Method Details
-
sendError
void sendError(int statusCode) Send an error with the givenstatusCode.- Parameters:
statusCode- the status to set in the response
-
sendError
Send an error with the givenstatusCodeandreasonmessage.- Parameters:
statusCode- the status to set in the response
-
setHeader
Set a header with the givennameandvalue.- Parameters:
name- the header namevalue- the header value
-