public static class WSUrlFetch.HttpUrlfetchResponse extends WS.HttpResponse
Constructor and Description |
---|
HttpUrlfetchResponse(HttpURLConnection connection)
you shouldn't have to create an HttpResponse yourself
|
Modifier and Type | Method and Description |
---|---|
String |
getHeader(String key) |
List<Http.Header> |
getHeaders() |
Integer |
getStatus()
the HTTP status code
|
String |
getStatusText()
the HTTP status text
|
InputStream |
getStream()
get the response as a stream
|
String |
getString()
get the response body as a string
|
String |
getString(String encoding)
get the response body as a string
|
getContentType, getEncoding, getJson, getQueryString, getXml, getXml, success
public HttpUrlfetchResponse(HttpURLConnection connection)
connection
- public Integer getStatus()
getStatus
in class WS.HttpResponse
public String getStatusText()
getStatusText
in class WS.HttpResponse
public String getHeader(String key)
getHeader
in class WS.HttpResponse
public List<Http.Header> getHeaders()
getHeaders
in class WS.HttpResponse
public String getString()
getString
in class WS.HttpResponse
public String getString(String encoding)
WS.HttpResponse
getString
in class WS.HttpResponse
encoding
- string charset encodingpublic InputStream getStream()
getStream
in class WS.HttpResponse
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly