public class JsonHttp extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthentication(String username,
String password) |
void |
addHeader(String name,
String value) |
void |
addParam(String name,
String value) |
void |
addParam(String name,
String value,
Class<? extends org.apache.http.client.methods.HttpRequestBase>... requestMethods) |
HttpInputStream |
delete(String path) |
HttpInputStream |
get(String path) |
HttpInputStream |
get(String path,
String json) |
HttpInputStream |
post(String path) |
HttpInputStream |
post(String path,
String json) |
HttpInputStream |
put(String path) |
HttpInputStream |
put(String path,
String json) |
void |
removeParam(String name) |
void |
removeParam(String name,
Class<? extends org.apache.http.client.methods.HttpRequestBase>... requestMethods) |
public JsonHttp(String url) throws MalformedURLException
MalformedURLExceptionpublic void addParam(String name, String value, Class<? extends org.apache.http.client.methods.HttpRequestBase>... requestMethods)
public void removeParam(String name)
public void removeParam(String name, Class<? extends org.apache.http.client.methods.HttpRequestBase>... requestMethods)
public HttpInputStream put(String path) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionpublic HttpInputStream put(String path, String json) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionpublic HttpInputStream post(String path) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionpublic HttpInputStream post(String path, String json) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionpublic HttpInputStream get(String path) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionpublic HttpInputStream get(String path, String json) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionpublic HttpInputStream delete(String path) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionCopyright © 2018. All rights reserved.