Interface UserServiceGetResponse
public interface UserServiceGetResponse
This interface provides methods to generate a response when processing
an GET request.
- Since:
- 5.8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns aOutputStream
suitable for writing binary data in the response.void
setContentType
(String aType) Sets the MIME type of the response being sent to the client.void
Sets a response header with the given name and value.
-
Method Details
-
setContentType
Sets the MIME type of the response being sent to the client. This method must be called beforegetOutputStream()
.- Parameters:
aType
- the MIME type.
-
setHeader
Sets a response header with the given name and value. If the header had already been set, the new value overwrites the previous one. This method must be called beforegetOutputStream()
.- Parameters:
aName
- the name of the headeraValue
- the header value. If it contains octet string, it should be encoded according to RFC 2047.
-
getOutputStream
OutputStream getOutputStream()Returns aOutputStream
suitable for writing binary data in the response.- Returns:
- the output stream. Never
null
.
-