void postRequest()

in src/main/java/org/openvasp/core/service/BaseService.java [50:62]


    void postRequest(String payload, String strUrl) {
        try {
            try (CloseableHttpClient httpClient = HttpClientBuilder.create().build()) {
                HttpPost request = new HttpPost(strUrl);
                request.addHeader("content-type", "application/json");
                request.setEntity(new StringEntity(payload));
                CloseableHttpResponse response = httpClient.execute(request);
                System.out.println(EntityUtils.toString(response.getEntity(), "UTF-8"));
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }