public abstract class AbstractResource extends Resty
Resty.Option, Resty.Timeout| Modifier and Type | Field and Description |
|---|---|
protected InputStream |
inputStream |
protected URLConnection |
urlConnection |
DEFAULT_USER_AGENT, MOZILLA, userAgent| Constructor and Description |
|---|
AbstractResource(Resty.Option... options) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
getAcceptedTypes() |
URLConnection |
getUrlConnection() |
HttpURLConnection |
http() |
URI |
location()
Get the location header as URI.
|
String |
printResponseHeaders()
Print out the response headers for this resource.
|
boolean |
status(int responseCode)
Check if the URLConnection has returned the specified responseCode
|
InputStream |
stream() |
addAdditionalHeaders, addStandardHeaders, bytes, bytes, bytes, bytes, chunked, chunked, content, content, content, content, createBinaryResource, createJSONResource, createTextResource, data, data, delete, doGET, dontSend, doPOSTOrPUT, fillResourceFromURL, form, form, getAdditionalHeaders, identifyAsMozilla, identifyAsResty, json, json, json, json, openConnection, path, put, setOptions, text, text, text, text, withHeaderprotected InputStream inputStream
protected URLConnection urlConnection
public AbstractResource(Resty.Option... options)
protected abstract String getAcceptedTypes()
public URLConnection getUrlConnection()
public HttpURLConnection http()
public URI location()
public String printResponseHeaders()
public boolean status(int responseCode)
responseCode - public InputStream stream()