@Response public abstract class HttpResponse extends Object
Consists simply of a simple string message.
Modifier | Constructor and Description |
---|---|
protected |
HttpResponse(String message)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getHeaders()
Returns the headers associated with this exception.
|
HttpResponse |
header(String name,
Object val)
Add an HTTP header to this response.
|
String |
toString() |
protected HttpResponse(String message)
message
- Message to send as the response.public HttpResponse header(String name, Object val)
name
- The header name.val
- The header value.@ResponseHeader(value="*") @BeanIgnore public Map<String,Object> getHeaders()
@ResponseBody public String toString()
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.