public static interface Net.HttpResponse
String
or an InputStream
.Modifier and Type | Method and Description |
---|---|
String |
getHeader(String name)
Returns the value of the header with the given name as a
String , or null if the header is not set. |
Map<String,List<String>> |
getHeaders()
Returns a Map of the headers.
|
byte[] |
getResult()
Returns the data of the HTTP response as a byte[].
|
InputStream |
getResultAsStream()
Returns the data of the HTTP response as an
InputStream . |
String |
getResultAsString()
Returns the data of the HTTP response as a
String . |
HttpStatus |
getStatus()
Returns the
HttpStatus containing the statusCode of the HTTP response. |
byte[] getResult()
Note: This method may only be called once per response.
Net.HttpRequest.setTimeOut(int)
String getResultAsString()
String
.
Note: This method may only be called once per response.
Net.HttpRequest.setTimeOut(int)
InputStream getResultAsStream()
InputStream
. HttpResponseListener#handleHttpResponse(HttpResponse)
. The underlying HTTP connection will be closed after that
callback finishes executing. Reading from the InputStream after it's connection has been closed will lead to exception.InputStream
with the Net.HttpResponse
data.HttpStatus getStatus()
HttpStatus
containing the statusCode of the HTTP response.String getHeader(String name)
String
, or null if the header is not set. See
HttpResponseHeader
.Map<String,List<String>> getHeaders()
HttpResponseHeader
.Copyright © 2014. All rights reserved.