public <T> HttpResponse<T> sendPostRequest(
        String endpoint, String xmlPayload, HttpResponse.BodyHandler<T> bodyHandler)
        throws IOException, InterruptedException {
    URI fullUrl = URI.create(configuration.getBaseUrl() + endpoint);

    HttpRequest request = HttpRequest.newBuilder()
            .uri(fullUrl)
            .header(TINGLYSNING_MESSAGE_ID, "uuid:ce01bb6d-3479-4975-8ab5-cdb8b203ab5e")
            .header(TINGLYSNING_RELATES_TO, "test")
            .header(CONTENT_TYPE,"application/xml")
            .timeout(Duration.ofSeconds(configuration.getRequestTimeoutSeconds()))
            .POST(HttpRequest.BodyPublishers.ofString(xmlPayload))
            .build();

    return httpClient.send(request, bodyHandler);
}
