Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.http.client
Class Response

    java.lang.Object
      com.google.gwt.http.client.Response

    public abstract class Response

extends java.lang.Object

Wrapper which provides access to the components of an HTTP response.

### Required Module

Modules that use this class should inherit `com.google.gwt.http.HTTP`.

>     <!--                                                                        -->
>     <!-- Copyright 2007 Google Inc.                                             -->
>     <!-- Licensed under the Apache License, Version 2.0 (the "License"); you    -->
>     <!-- may not use this file except in compliance with the License. You may   -->
>     <!-- may obtain a copy of the License at                                    -->
>     <!--                                                                        -->
>     <!-- http://www.apache.org/licenses/LICENSE-2.0                             -->
>     <!--                                                                        -->
>     <!-- Unless required by applicable law or agreed to in writing, software    -->
>     <!-- distributed under the License is distributed on an "AS IS" BASIS,      -->
>     <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        -->
>     <!-- implied. License for the specific language governing permissions and   -->
>     <!-- limitations under the License.                                         -->

>     <module>
>       <!-- other inherited modules, such as com.google.gwt.user.User -->
>       <inherits name="com.google.gwt.http.HTTP"/>
>       <!-- additional module settings -->
>     </module>

Constructor Summary
`Response()`

Method Summary
`abstract java.lang.String` | `getHeader(java.lang.String header)` Returns the value of the requested header or null if the header was not specified.
`abstract Header[]` | `getHeaders()` Returns an array of HTTP headers associated with this response.
`abstract java.lang.String` | `getHeadersAsString()` Returns all headers as a single string.
`abstract int` | `getStatusCode()` Returns the HTTP status code that is part of this response.
`abstract java.lang.String` | `getStatusText()` Returns the HTTP status message text.
`abstract java.lang.String` | `getText()` Returns the text associated with the response.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Response

    public Response()

Method Detail

### getHeader

    public abstract java.lang.String getHeader(java.lang.String header)

  Returns the value of the requested header or null if the header was not specified.

  Parameters:
    `header` - the header to query for
  Returns:
    the value of response header
  Throws:
    `java.lang.IllegalArgumentException` - if the header name is empty
    `java.lang.NullPointerException` - if the header name is null

### getHeaders

    public abstract Header[] getHeaders()

  Returns an array of HTTP headers associated with this response.

  Returns:
    array of HTTP headers; returns zero length array if there are no headers

### getHeadersAsString

    public abstract java.lang.String getHeadersAsString()

  Returns all headers as a single string. The individual headers are delimited by a CR (U+000D) LF (U+000A) pair. An individual header is formatted according to RFC 2616.

  Returns:
    all headers as a single string delimited by CRLF pairs

### getStatusCode

    public abstract int getStatusCode()

  Returns the HTTP status code that is part of this response.

  Returns:
    the HTTP status code

### getStatusText

    public abstract java.lang.String getStatusText()

  Returns the HTTP status message text.

  Returns:
    the HTTP status message text

### getText

    public abstract java.lang.String getText()

  Returns the text associated with the response.

  Returns:
    the response text

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD