String executeHttpPost(final Map<String, Serializable> options, final String apiInterfaceName, final String methodName, final List<String> classNameParameters, final Object[] parametersValues) throws IOException { final HttpPost httpost = createHttpPost(options, apiInterfaceName, methodName, classNameParameters, parametersValues); try { return httpclient.execute(httpost, RESPONSE_HANDLER); } catch (final ClientProtocolException e) { String httpCodeMessage = ""; // required as the http code is not included in the exception message if (e instanceof HttpResponseException) { final int statusCode = ((HttpResponseException) e).getStatusCode(); httpCodeMessage = format(" (http code: %s)", statusCode); } throw new IOException("Error while executing POST request" + httpCodeMessage + " <" + httpost + ">", e); } }
String executeHttpPost(final Map<String, Serializable> options, final String apiInterfaceName, final String methodName, final List<String> classNameParameters, final Object[] parametersValues) throws IOException { final HttpPost httpost = createHttpPost(options, apiInterfaceName, methodName, classNameParameters, parametersValues); try { return httpclient.execute(httpost, RESPONSE_HANDLER); } catch (final ClientProtocolException e) { String httpCodeMessage = ""; // required as the http code is not included in the exception message if (e instanceof HttpResponseException) { final int statusCode = ((HttpResponseException) e).getStatusCode(); httpCodeMessage = format(" (http code: %s)", statusCode); } throw new IOException("Error while executing POST request" + httpCodeMessage + " <" + httpost + ">", e); } }