org.restlet.engine.http

## Class HttpResponse

- java.lang.Object
- - org.restlet.Message
  - - org.restlet.Response
    - - org.restlet.engine.http.HttpResponse

    public class HttpResponse
    extends Response

Response wrapper for server HTTP calls.

Author:
  Jerome Louvel

### Constructor Summary

Constructors
Constructor and Description
`HttpResponse(ServerCall httpCall, Request request)` Constructor.

### Method Summary

Methods
`static void` `addHeader(Response response, java.lang.String headerName, java.lang.String headerValue)` Adds a new header to the given request.
`Series<Parameter>` `getHeaders()` Returns the HTTP headers.
`ServerCall` `getHttpCall()` Returns the low-level HTTP call.
`ServerInfo` `getServerInfo()` Returns the server-specific information.

### Methods inherited from class org.restlet.Response

`abort, commit, getAge, getAllowedMethods, getAuthenticationInfo, getChallengeRequests, getCookieSettings, getCurrent, getDimensions, getLocationRef, getProxyChallengeRequests, getRequest, getRetryAfter, getStatus, isAutoCommitting, isCommitted, isConfidential, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAge, setAllowedMethods, setAuthenticationInfo, setAutoCommitting, setChallengeRequest, setChallengeRequests, setCommitted, setCookieSettings, setCurrent, setDimensions, setLocationRef, setLocationRef, setProxyChallengeRequests, setRequest, setRetryAfter, setServerInfo, setStatus, setStatus, setStatus, setStatus, toString`

### Methods inherited from class org.restlet.Message

`getAttributes, getCacheDirectives, getDate, getEntity, getEntityAsForm, getEntityAsText, getOnSent, getRecipientsInfo, getWarnings, isEntityAvailable, release, setAttributes, setCacheDirectives, setDate, setEntity, setEntity, setOnSent, setRecipientsInfo, setWarnings`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### HttpResponse

    public HttpResponse(ServerCall httpCall,
                Request request)

Constructor.

Parameters:
  `httpCall` - The low-level HTTP server call.
  `request` - The associated high-level request.

### Method Detail

#### addHeader

    public static void addHeader(Response response,
                 java.lang.String headerName,
                 java.lang.String headerValue)

Adds a new header to the given request.

Parameters:
  `response` - The response to update.
  `headerName` - The header name to add.
  `headerValue` - The header value to add.

#### getHeaders

    public Series<Parameter> getHeaders()

Returns the HTTP headers.

Returns:
  The HTTP headers.

#### getHttpCall

    public ServerCall getHttpCall()

Returns the low-level HTTP call.

Returns:
  The low-level HTTP call.

#### getServerInfo

    public ServerInfo getServerInfo()

Returns the server-specific information.

Overrides:
  `getServerInfo` in class `Response`
Returns:
  The server-specific information.