public static int checkResponse(final HttpResponse response) {
        int responseCode;
        try {
            LOGGER.debug(() -> "Connection response " + response.getCode() + ": " + response.getReasonPhrase());

            responseCode = response.getCode();
            if (responseCode != 200) {
                final String message = response.getReasonPhrase();

                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug("Connection response " + responseCode + ": " + message);
                }

                int stroomStatus = -1;
                final Header[] headers = response.getHeaders(StandardHeaderArguments.STROOM_STATUS);
                if (headers.length > 0) {
                    final String value = headers[0].getValue();
                    if (value != null) {
                        try {
                            stroomStatus = Integer.parseInt(value);
                        } catch (final NumberFormatException e) {
                            LOGGER.debug(e::getMessage, e);
                        }
                    }
                }

                if (stroomStatus != -1) {
                    throw new StroomStreamException(StroomStatusCode.getStroomStatusCode(stroomStatus), message);
                } else {
                    throw new StroomStreamException(StroomStatusCode.UNKNOWN_ERROR, message);
                }
            }
        } catch (final Exception ioEx) {
            LOGGER.debug(ioEx.getMessage(), ioEx);
            throw new StroomStreamException(StroomStatusCode.UNKNOWN_ERROR,
                    ioEx.getMessage() != null
                            ? ioEx.getMessage()
                            : ioEx.toString());
        }
        return responseCode;
    }
Handler class that forwards the request to a URL.
stroom-pipeline/src/main/java/stroom/pipeline/writer/HTTPAppender.java