public abstract class AbstractResource extends Resty
Resty.Option, Resty.Timeout
Modifier and Type | Field and Description |
---|---|
protected java.io.InputStream |
inputStream |
protected java.net.URLConnection |
urlConnection |
DEFAULT_USER_AGENT, MOZILLA, userAgent
Constructor and Description |
---|
AbstractResource(Resty.Option... options) |
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.String |
getAcceptedTypes() |
java.net.URLConnection |
getUrlConnection() |
java.net.HttpURLConnection |
http() |
java.net.URI |
location()
Get the location header as URI.
|
java.lang.String |
printResponseHeaders()
Print out the response headers for this resource.
|
boolean |
status(int responseCode)
Check if the URLConnection has returned the specified responseCode
|
java.io.InputStream |
stream() |
addAdditionalHeaders, addStandardHeaders, alwaysSend, 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, withHeader
protected java.net.URLConnection urlConnection
protected java.io.InputStream inputStream
public AbstractResource(Resty.Option... options)
protected abstract java.lang.String getAcceptedTypes()
public java.net.URLConnection getUrlConnection()
public java.net.HttpURLConnection http()
public java.io.InputStream stream()
public boolean status(int responseCode)
responseCode
- public java.net.URI location()
public java.lang.String printResponseHeaders()