private BeanstreamResponse process(HttpUriRequest http,
                ResponseHandler<BeanstreamResponse> responseHandler) throws IOException {
        
        HttpClient httpclient;
        if (customHttpClient != null)
            httpclient = customHttpClient;
        else
            httpclient = HttpClients.createDefault();
        // Remove newlines from base64 since they can bork the header.
        // Some base64 encoders will append a newline to the end
        String auth = Base64.encode((merchantId + ":" + apiPasscode).trim().getBytes());
        
        http.addHeader("Content-Type", "application/json");
        http.addHeader("Authorization", "Passcode " + auth);

        BeanstreamResponse responseBody = httpclient.execute(http, responseHandler);
        
        return responseBody;
    }