|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.aerogear.android.impl.http.HttpRestProvider
public final class HttpRestProvider
These are tuned for AeroGear, assume the body is String data, and that the headers don't do anything funny.
| Constructor Summary | |
|---|---|
HttpRestProvider(URL url)
|
|
HttpRestProvider(URL url,
Integer timeout)
|
|
| Method Summary | |
|---|---|
HeaderAndBody |
delete(String id)
Issues an HTTP request, consumes the content, and cleans up after itself. |
HeaderAndBody |
get()
Issues an HTTP request, consumes the content, and cleans up after itself. |
URL |
getUrl()
|
HeaderAndBody |
post(byte[] data)
Issues an HTTP request, consumes the content, and cleans up after itself. |
HeaderAndBody |
post(String data)
Issues an HTTP request, consumes the content, and cleans up after itself. |
HeaderAndBody |
put(String id,
byte[] data)
Issues an HTTP request, consumes the content, and cleans up after itself. |
HeaderAndBody |
put(String id,
String data)
Issues an HTTP request, consumes the content, and cleans up after itself. |
void |
setDefaultHeader(String headerName,
String headerValue)
Will set a default header value to be used on all calls |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpRestProvider(URL url)
public HttpRestProvider(URL url,
Integer timeout)
| Method Detail |
|---|
public URL getUrl()
getUrl in interface HttpProvider
public HeaderAndBody get()
throws HttpException
get in interface HttpProviderHttpException - if the http request doesn't return status 200
public HeaderAndBody post(String data)
throws RuntimeException
post in interface HttpProviderHttpException - if the http request doesn't return status 200
RuntimeException
public HeaderAndBody post(byte[] data)
throws RuntimeException
post in interface HttpProviderHttpException - if the http request doesn't return status 200
RuntimeException
public HeaderAndBody put(String id,
String data)
throws RuntimeException
put in interface HttpProviderHttpException - if the http request doesn't return status 200
RuntimeException
public HeaderAndBody put(String id,
byte[] data)
throws RuntimeException
put in interface HttpProviderHttpException - if the http request doesn't return status 200
RuntimeException
public HeaderAndBody delete(String id)
throws RuntimeException
delete in interface HttpProviderHttpException - if the http request doesn't return status 200
RuntimeException
public void setDefaultHeader(String headerName,
String headerValue)
HttpProvider
setDefaultHeader in interface HttpProviderheaderName - nameheaderValue - value
|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||