public HttpResponse execute(HttpRequest request) throws IOException {
        final HttpURLConnection urlConn = createConnection(request);
        urlConn.connect();

        final HttpHeaders headers = new HttpHeaders(urlConn.getHeaderFields());
        final HttpRespStatus status = HttpRespStatus.valueOf(urlConn.getResponseCode());
        if (SUCCESS.contains(status.code())) {
            return new HttpResponse(status, headers, toBytes(urlConn.getInputStream()));
        } else {
            return new HttpResponse(status, headers, toBytes(urlConn.getErrorStream()));
        }
    }
@Test
    public void testPost() {
        Map<String, List<String>> params = MapUtils.createHashMap(2);
        params.put("db", Collections.singletonList("http"));

        HttpRequest req = new HttpRequest.Builder()
                .url("localhost:8686/write")
                .params(params)
                .post("cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000\n" +
                        "cpu_load_short,host=server02,region=us-west value=0.96 1434055562000000000")
                .build();

        for (int i = 0; i < 10; i++) {
            try {
                HttpResponse resp = httpClient.execute(req);
                Assert.assertEquals(OK, resp.getStatus());
                Assert.assertEquals(RESPONSE_BODY, resp.getBodyString());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }