public class HttpRestProviderForPush extends Object implements HttpProvider
| Constructor and Description |
|---|
HttpRestProviderForPush(URL url,
Integer timeout) |
| Modifier and Type | Method and Description |
|---|---|
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
|
void |
setPasswordAuthentication(String username,
String password) |
public URL getUrl()
getUrl in interface HttpProviderpublic HeaderAndBody get() throws HttpException
HttpProviderget in interface HttpProviderHttpException - if the http request doesn't return status 200public HeaderAndBody post(String data) throws HttpException
HttpProviderpost in interface HttpProviderdata - the string body of the http requestHttpException - if the http request doesn't return status 200public HeaderAndBody post(byte[] data) throws HttpException
HttpProviderpost in interface HttpProviderdata - the binary body of the http requestHttpException - if the http request doesn't return status 200public HeaderAndBody put(String id, String data) throws HttpException
HttpProviderput in interface HttpProviderid - an ID which will be appended to the baseURLdata - the string body of the http requestHttpException - if the http request doesn't return status 200public HeaderAndBody put(String id, byte[] data) throws HttpException
HttpProviderput in interface HttpProviderid - an ID which will be appended to the baseURLdata - the binary body of the http requestHttpException - if the http request doesn't return status 200public HeaderAndBody delete(String id) throws HttpException
HttpProviderdelete in interface HttpProviderid - an ID which will be appended to the baseURLHttpException - if the http request doesn't return status 200public void setDefaultHeader(String headerName, String headerValue)
HttpProvidersetDefaultHeader in interface HttpProviderheaderName - nameheaderValue - valueCopyright © 2014 JBoss by Red Hat. All rights reserved.