public class HttpJsonClient extends Object
| Constructor and Description |
|---|
HttpJsonClient() |
| Modifier and Type | Method and Description |
|---|---|
static void |
displayHeaderFields(HttpURLConnection httpURLConnection) |
String |
get(String urlStr) |
<T extends OAObject> |
get(String urlStr,
Class<T> responseClass) |
<T extends OAObject> |
get(String urlStr,
Class<T> responseClass,
Map<String,String> mapRequest) |
<T extends OAObject> |
get(String urlStr,
Class<T> responseClass,
OAObject objRequest) |
String |
get(String urlStr,
Map<String,String> mapRequest) |
String |
get(String urlStr,
OAObject objRequest) |
static void |
main(String[] args) |
String |
perform(String urlStr,
String methodName,
String jsonRequest) |
String |
post(String urlStr) |
<T extends OAObject> |
post(String urlStr,
Class<T> responseClass) |
<T extends OAObject> |
post(String urlStr,
Class<T> responseClass,
Map<String,String> mapRequest) |
<T extends OAObject> |
post(String urlStr,
Class<T> responseClass,
OAObject reqObject) |
<T extends OAObject> |
post(String urlStr,
Class<T> responseClass,
String jsonRequest) |
String |
post(String urlStr,
Map<String,String> mapRequest) |
String |
post(String urlStr,
OAObject reqObject) |
String |
post(String urlStr,
String jsonRequest) |
void |
setCookie(String val) |
void |
setUserAccess(String userId,
String password) |
protected String |
urlEncode(Map<String,String> map) |
String |
urlEncode(OAObject obj) |
public void setCookie(String val)
public String get(String urlStr) throws IOException
IOExceptionpublic <T extends OAObject> T get(String urlStr, Class<T> responseClass) throws Exception
Exceptionpublic String get(String urlStr, Map<String,String> mapRequest) throws Exception
Exceptionpublic <T extends OAObject> T get(String urlStr, Class<T> responseClass, Map<String,String> mapRequest) throws Exception
Exceptionpublic <T extends OAObject> T get(String urlStr, Class<T> responseClass, OAObject objRequest) throws Exception
Exceptionpublic String post(String urlStr) throws IOException
IOExceptionpublic String post(String urlStr, String jsonRequest) throws IOException
IOExceptionpublic <T extends OAObject> T post(String urlStr, Class<T> responseClass) throws Exception
Exceptionpublic String post(String urlStr, Map<String,String> mapRequest) throws Exception
Exceptionpublic <T extends OAObject> T post(String urlStr, Class<T> responseClass, Map<String,String> mapRequest) throws Exception
Exceptionpublic <T extends OAObject> T post(String urlStr, Class<T> responseClass, String jsonRequest) throws Exception
Exceptionpublic <T extends OAObject> T post(String urlStr, Class<T> responseClass, OAObject reqObject) throws Exception
Exceptionpublic String perform(String urlStr, String methodName, String jsonRequest) throws IOException
IOExceptionpublic static void displayHeaderFields(HttpURLConnection httpURLConnection) throws IOException
IOExceptionCopyright © 1999–2025 ViaOA. All rights reserved.