Title: Client HTTP Request class
Description: this class helps to send POST HTTP requests with various form data, including files. Cookies can be added to be included in the request.
109110111112113114115116117118119120121122
JHTML jh = new JHTML(sample); JHTML.Form form = jh.getFormWithInput("AWSAccessKeyId"); if (form != null) { form.delInput("upload"); String url = form.getAction(); ClientHttpRequest chr = new ClientHttpRequest(JConfig.getURL(url)); chr.setParameters(form.getCGIMap()); chr.setParameter("file", f); HttpURLConnection huc = chr.post(); InputStream resp = http().getStream(huc); result = StringTools.cat(resp); // JConfig.log().logDebug(result); resp.close(); }