class HTTP {

    public static byte[] getBytesWithHeaders(
            final String url, final String contentType, final Map<String, ?> headers ) {

        return Exceptions.tryIt( byte[].class, new Exceptions.TrialWithReturn<byte[]>() {
            @Override
            public byte[] tryIt() throws Exception {
                URLConnection connection;
                connection = doGet( url, headers, contentType, null, true );
                return extractResponseBytes( connection );
            }
        } );

    }

}