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