@Override
    public void filter(ClientRequestContext requestContext) throws IOException {
        // add header to define the api version
        requestContext.getHeaders().add("Accept", "version=2");
        
        // log all headers
        MultivaluedMap<String, Object> headers = requestContext.getHeaders();
        Iterator<?> it = headers.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry<?, ?> pair = (Map.Entry<?, ?>)it.next();
            logger.debug("Header name: {}, value: {}.", pair.getKey(), pair.getValue()); 
        }
        
    }