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
IOException
public <T extends OAObject> T get(String urlStr, Class<T> responseClass) throws Exception
Exception
public String get(String urlStr, Map<String,String> mapRequest) throws Exception
Exception
public <T extends OAObject> T get(String urlStr, Class<T> responseClass, Map<String,String> mapRequest) throws Exception
Exception
public <T extends OAObject> T get(String urlStr, Class<T> responseClass, OAObject objRequest) throws Exception
Exception
public String post(String urlStr) throws IOException
IOException
public String post(String urlStr, String jsonRequest) throws IOException
IOException
public <T extends OAObject> T post(String urlStr, Class<T> responseClass) throws Exception
Exception
public String post(String urlStr, Map<String,String> mapRequest) throws Exception
Exception
public <T extends OAObject> T post(String urlStr, Class<T> responseClass, Map<String,String> mapRequest) throws Exception
Exception
public <T extends OAObject> T post(String urlStr, Class<T> responseClass, String jsonRequest) throws Exception
Exception
public <T extends OAObject> T post(String urlStr, Class<T> responseClass, OAObject reqObject) throws Exception
Exception
public String perform(String urlStr, String methodName, String jsonRequest) throws IOException
IOException
public static void displayHeaderFields(HttpURLConnection httpURLConnection) throws IOException
IOException
Copyright © 1999–2025 ViaOA. All rights reserved.