public interface HttpProvider
| 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
|
URL getUrl()
HeaderAndBody get() throws HttpException
HttpException - if the http request doesn't return status 200HeaderAndBody post(String data) throws HttpException
data - the string body of the http requestHttpException - if the http request doesn't return status 200HeaderAndBody post(byte[] data) throws HttpException
data - the binary body of the http requestHttpException - if the http request doesn't return status 200HeaderAndBody put(String id, String data) throws HttpException
id - an ID which will be appended to the baseURLdata - the string body of the http requestHttpException - if the http request doesn't return status 200HeaderAndBody put(String id, byte[] data) throws HttpException
id - an ID which will be appended to the baseURLdata - the binary body of the http requestHttpException - if the http request doesn't return status 200HeaderAndBody delete(String id) throws HttpException
id - an ID which will be appended to the baseURLHttpException - if the http request doesn't return status 200Copyright © 2014 JBoss by Red Hat. All rights reserved.