com.ephox.editlive.http
Interface HttpResponse


public interface HttpResponse

HTTP response details returned by HttpManager for basic requests.

Since:
7.5

Method Summary
 String getCharset()
           
 InputStream getInputStream()
          Returns the input stream for this response.
 String getResponseBody()
          Get the response body as a string using getInputStream() and getCharset()
 int getResponseCode()
           
 String getResponseHeader(String header)
          Get a specific HTTP header value
 String getResponseMessage()
          The status line message returned by the server.
 boolean isNotModified()
           
 

Method Detail

getResponseCode

int getResponseCode()
Returns:
Response code returned by the server.

getResponseMessage

String getResponseMessage()
The status line message returned by the server.

Returns:
the status line text.

getCharset

String getCharset()
Returns:
the response character set returned by the server.

isNotModified

boolean isNotModified()
Returns:
true if the resource was not modified, otherwise false.

getResponseHeader

String getResponseHeader(String header)
Get a specific HTTP header value

Parameters:
header - name of HTTP header
Returns:
HTTP header value, or null if it was not included in the response

getInputStream

InputStream getInputStream()
Returns the input stream for this response. It is imperative that the entire content is read from the resulting stream.

Returns:
the created input stream or null if an input stream couldn't be created.

getResponseBody

String getResponseBody()
Get the response body as a string using getInputStream() and getCharset()

Returns:
the body of the response converted to a string using the response charset or null if an input stream couldn't be created.

Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved.