Home » HttpComponents-Core-4.0.1 » org.apache.http » [javadoc | source]
org.apache.http
public interface: HttpResponse [javadoc | source]

All Implemented Interfaces:
    HttpMessage

All Known Implementing Classes:
    BasicHttpResponse

After receiving and interpreting a request message, a server responds with an HTTP response message.
    Response      = Status-Line
                    *(( general-header
                     | response-header
                     | entity-header ) CRLF)
                    CRLF
                    [ message-body ]
Method from org.apache.http.HttpResponse Summary:
getEntity,   getLocale,   getStatusLine,   setEntity,   setLocale,   setReasonPhrase,   setStatusCode,   setStatusLine,   setStatusLine,   setStatusLine
Method from org.apache.http.HttpResponse Detail:
 public HttpEntity getEntity()
    Obtains the message entity of this response, if any. The entity is provided by calling setEntity .
 public Locale getLocale()
    Obtains the locale of this response. The locale is used to determine the reason phrase for the status code . It can be changed using setLocale .
 public StatusLine getStatusLine()
    Obtains the status line of this response. The status line can be set using one of the setStatusLine methods, or it can be initialized in a constructor.
 public  void setEntity(HttpEntity entity)
    Associates a response entity with this response.
 public  void setLocale(Locale loc)
    Changes the locale of this response. If there is a status line, it's reason phrase will be updated according to the status code and new locale.
 public  void setReasonPhrase(String reason) throws IllegalStateException
    Updates the status line of this response with a new reason phrase. The status line can only be updated if it is available. It must have been set either explicitly or in a constructor.
 public  void setStatusCode(int code) throws IllegalStateException
    Updates the status line of this response with a new status code. The status line can only be updated if it is available. It must have been set either explicitly or in a constructor.
    The reason phrase will be updated according to the new status code, based on the current locale . It can be set explicitly using setReasonPhrase .
 public  void setStatusLine(StatusLine statusline)
    Sets the status line of this response.
 public  void setStatusLine(ProtocolVersion ver,
    int code)
    Sets the status line of this response. The reason phrase will be determined based on the current locale .
 public  void setStatusLine(ProtocolVersion ver,
    int code,
    String reason)
    Sets the status line of this response with a reason phrase.