private ResponseStatus post(final HttpPost httpPost,
                                final AttributeMap attributeMap,
                                final LongSupplier contentLengthSupplier) throws ForwardException {
        // Execute and get the response.
        final DurationTimer timer = DurationTimer.start();
        try {
            final ResponseStatus responseStatus = httpClient.execute(httpPost, response -> {
                LOGGER.debug(() -> LogUtil.message(
                        "'{}' - Closing stream, response header fields:\n{}",
                        forwarderName, formatHeaderEntryListForLogging(response.getHeaders())));
                return logResponseToSendLog(timer.get(), response, attributeMap, contentLengthSupplier);
            });

            LOGGER.debug("'{}' - responseStatus: {}, duration: {}", forwarderName, responseStatus, timer);

            // There is no point retrying with these
            final StroomStatusCode stroomStatusCode = responseStatus.stroomStatusCode;
            if (stroomStatusCode == StroomStatusCode.OK) {
                return responseStatus;
            } else if (NON_RECOVERABLE_STATUS_CODES.contains(stroomStatusCode)) {
                throw ForwardException.nonRecoverable(responseStatus, attributeMap);
            } else {
                throw ForwardException.recoverable(responseStatus, attributeMap);
            }
        } catch (final ForwardException e) {
            // Created above so we will have already logged
            throw e;
        } catch (final Exception e) {
            final Duration duration = timer.get();
            final long byteCount = LogUtil.swallowExceptions(contentLengthSupplier)
                    .orElse(0);
            // Have to assume that any exception is recoverable
            final String msg = LogUtil.message("Error during HTTP POST, data sent: {}, duration: {}, error: {}",
                    ByteSize.ofBytes(byteCount), duration, LogUtil.exceptionMessage(e));
            logErrorToSendLog(duration, e, msg, attributeMap);
            throw ForwardException.recoverable(
                    StroomStatusCode.UNKNOWN_ERROR, attributeMap, msg, e);
        }
    }
Handler class that forwards the request to a URL.
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/HttpSender.java