public interface IJetAPI extends IApi
Modifier and Type | Method and Description |
---|---|
IJetAPIResponse |
get(String url,
Map<String,String> headers)
Perform a get-based request to some endpoint
|
JetHeaderBuilder |
getHeaderBuilder()
Retrieve a HeaderBuilder instance with an Authorization header
|
JetHeaderBuilder |
getJSONHeaderBuilder()
Retrieve a headers map for use with a JSON request
|
JetHeaderBuilder |
getPlainHeaderBuilder()
Retrieve a headers map for use with a plain text request
|
IJetAPIResponse |
post(String url,
InputStream payload,
long contentLength,
org.apache.http.entity.ContentType contentType,
Map<String,String> headers)
Perform a put-based request to some endpoint
|
IJetAPIResponse |
post(String url,
PostFile file,
Map<String,String> headers) |
IJetAPIResponse |
post(String url,
String payload,
Map<String,String> headers)
Send arbitrary post data to some endpoint
|
IJetAPIResponse |
put(String url,
InputStream payload,
long contentLength,
org.apache.http.entity.ContentType contentType,
Map<String,String> headers)
Perform a put-based request to some endpoint
|
IJetAPIResponse |
put(String url,
PostFile file,
Map<String,String> headers) |
IJetAPIResponse |
put(String url,
String payload,
Map<String,String> headers)
Perform a put-based request to some endpoint
|
void |
setErrorHandler(IJetErrorHandler handler) |
IJetAPIResponse get(String url, Map<String,String> headers) throws APIException, JetException
get
in interface IApi
url
- The URLheaders
- Extra headers to sendAPIException
- If something goes wrong (like an IOException)JetException
- if jet has some issueJetHeaderBuilder getHeaderBuilder()
JetHeaderBuilder getJSONHeaderBuilder()
JetHeaderBuilder getPlainHeaderBuilder()
void setErrorHandler(IJetErrorHandler handler)
IJetAPIResponse post(String url, String payload, Map<String,String> headers) throws APIException, JetException
post
in interface IApi
url
- URLpayload
- Data to sendheaders
- Extra headers to sendAPIException
- if something goes wrongJetException
IJetAPIResponse post(String url, InputStream payload, long contentLength, org.apache.http.entity.ContentType contentType, Map<String,String> headers) throws APIException
post
in interface IApi
url
- URLpayload
- Payload to sendheaders
- additional headers to sendAPIException
IJetAPIResponse post(String url, PostFile file, Map<String,String> headers) throws APIException
post
in interface IApi
APIException
IJetAPIResponse put(String url, String payload, Map<String,String> headers) throws APIException, JetException
put
in interface IApi
url
- URLpayload
- Payload to sendheaders
- additional headers to sendAPIException
JetException
IJetAPIResponse put(String url, InputStream payload, long contentLength, org.apache.http.entity.ContentType contentType, Map<String,String> headers) throws APIException, JetException
put
in interface IApi
url
- URLpayload
- Payload to sendheaders
- additional headers to sendAPIException
JetException
IJetAPIResponse put(String url, PostFile file, Map<String,String> headers) throws APIException, JetException
put
in interface IApi
APIException
JetException
Copyright © 2017. All rights reserved.