List of utility methods to do HTTP Post
String | httpPost(String httpUrl) http Post BufferedReader input = null; StringBuilder sb = null; URL url = null; HttpURLConnection con = null; try { url = new URL(httpUrl); try { con = (HttpURLConnection) url.openConnection(); ... |
int | httpPost(String url, StringBuffer data) http Post return httpPost(url, data, null);
|
String | httpPost(String urlToRead, String post) Performs synchronous HTTP POST request with raw data, returns the response. return httpPost(urlToRead, post, Proxy.NO_PROXY);
|
String | httpPostText(String urlStr, String textString) http Post Text URL url = new URL(urlStr); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type", "text/plain"); conn.setRequestProperty("Accept", "application/json"); conn.setDoOutput(true); OutputStream out = conn.getOutputStream(); Writer writer = new OutputStreamWriter(out, "UTF-8"); ... |
String | post(String json, String url) post HttpURLConnection connection = (HttpURLConnection) (new URL(url)).openConnection(); connection.setRequestMethod("POST"); connection.setDoOutput(true); connection.setUseCaches(false); connection.setRequestProperty("Content-Type", "application/JSON"); DataOutputStream out = new DataOutputStream(connection.getOutputStream()); out.writeBytes(json); int code = connection.getResponseCode(); ... |
String | post(String json, String url) post HttpURLConnection connection = (HttpURLConnection) (new URL(url)).openConnection(); connection.setRequestMethod("POST"); connection.setDoOutput(true); connection.setUseCaches(false); connection.setRequestProperty("Content-Type", "application/JSON"); DataOutputStream out = new DataOutputStream(connection.getOutputStream()); out.writeBytes(json); int code = connection.getResponseCode(); ... |
String | post(String rawUrl, String body) post BufferedReader reader = null; OutputStream out = null; try { URL url = new URL(rawUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setDoOutput(true); connection.setDoInput(true); ... |
List | post(String url, int timeout, Map header) Method to make a POST request to the specified url return request(url, timeout, "POST", header); |
String | post(String url, JsonNode body) post return post(url, body.toString());
|
String | post(String url, Map post return post(url, params, null, charset);
|