@SuppressWarnings("unused") public HttpCommandResponse execute(String url, HttpParameters parameters, String charsetName) throws IOException { HttpPost httpPut = new HttpPost(url); httpPut.setEntity(new UrlEncodedFormEntity(parameters, Charset.forName(charsetName))); return new HttpCommandResponse(shellHttpClient.getHttpClient().execute(httpPut)); }
@SuppressWarnings("unused") public HttpCommandResponse execute(String url, String body, String mimeType, String charsetName) throws IOException { HttpPost httpPut = new HttpPost(url); httpPut.setEntity( new StringEntity(body, ContentType.create(mimeType, Charset.forName(charsetName)))); return new HttpCommandResponse(shellHttpClient.getHttpClient().execute(httpPut)); }
@SuppressWarnings("unused") public HttpCommandResponse execute(String url, String body) throws IOException { HttpPost httpPut = new HttpPost(url); httpPut.setEntity(new StringEntity(body, ContentType.DEFAULT_TEXT)); return new HttpCommandResponse(shellHttpClient.getHttpClient().execute(httpPut)); }
@SuppressWarnings("unused") public HttpCommandResponse execute(String url) throws IOException { return new HttpCommandResponse(shellHttpClient.getHttpClient().execute(new HttpPost(url))); }