Package com.parse.http
Class ParseHttpResponse
- java.lang.Object
-
- com.parse.http.ParseHttpResponse
-
public final class ParseHttpResponse extends java.lang.Object
The http response we receive from parse server. Instances of this class are not immutable. The response body may be consumed only once. The other fields are immutable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParseHttpResponse.Builder
Builder forParseHttpResponse
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getAllHeaders()
Gets all headers from thisParseHttpResponse
.java.io.InputStream
getContent()
Returns the content of theParseHttpResponse
's body.java.lang.String
getContentType()
Gets theContent-Type
of thisParseHttpResponse
.java.lang.String
getHeader(java.lang.String name)
Retrieves the header value from thisParseHttpResponse
by the given header name.java.lang.String
getReasonPhrase()
Gets the reason phrase of thisParseHttpResponse
.int
getStatusCode()
Gets the status code of thisParseHttpResponse
.long
getTotalSize()
Returns the size of theParseHttpResponse
's body.
-
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
Gets the status code of thisParseHttpResponse
.- Returns:
- The status code of this
ParseHttpResponse
.
-
getContent
public java.io.InputStream getContent()
Returns the content of theParseHttpResponse
's body. The content can only be read once and can't be reset.- Returns:
- The content of the
ParseHttpResponse
's body.
-
getTotalSize
public long getTotalSize()
Returns the size of theParseHttpResponse
's body.-1
if the size of theParseHttpResponse
's body is unknown.- Returns:
- The size of the
ParseHttpResponse
's body.
-
getReasonPhrase
public java.lang.String getReasonPhrase()
Gets the reason phrase of thisParseHttpResponse
.- Returns:
- The reason phrase of this
ParseHttpResponse
.
-
getContentType
public java.lang.String getContentType()
Gets theContent-Type
of thisParseHttpResponse
.- Returns:
- The
Content-Type
of thisParseHttpResponse
.
-
getHeader
public java.lang.String getHeader(java.lang.String name)
Retrieves the header value from thisParseHttpResponse
by the given header name.- Parameters:
name
- The name of the header.- Returns:
- The value of the header.
-
getAllHeaders
public java.util.Map<java.lang.String,java.lang.String> getAllHeaders()
Gets all headers from thisParseHttpResponse
.- Returns:
- The headers of this
ParseHttpResponse
.
-
-