public class HttpService extends Object
| Constructor and Description |
|---|
HttpService(String host,
String token) |
| Modifier and Type | Method and Description |
|---|---|
String |
delete(String path) |
BufferedReader |
downstream(String path) |
String |
get(String path) |
HttpResponseFormat |
getOutput(String path,
String responseFormat) |
String |
post(String path,
String data) |
String |
postData(String path,
String data) |
String |
put(String path,
String data) |
String |
sfpost(String path,
Map<String,String> params,
InputStream stream) |
String |
upstream(String path,
byte[] data) |
public String post(String path, String data) throws Exception
path - data - Exceptionpublic String postData(String path, String data) throws Exception
path - data - Exceptionpublic String put(String path, String data) throws Exception
path - data - Exceptionpublic String delete(String path) throws Exception
path - Exceptionpublic String sfpost(String path, Map<String,String> params, InputStream stream) throws Exception
path - params - stream - Exceptionpublic String upstream(String path, byte[] data) throws Exception
path - data - Exceptionpublic BufferedReader downstream(String path) throws Exception
path - Exceptionpublic HttpResponseFormat getOutput(String path, String responseFormat) throws Exception
path - responseFormat - ExceptionCopyright © 2018. All rights reserved.