// Path: src/main/java/uk/ac/ic/wlgitbridge/util/FunctionT.java
// @FunctionalInterface
// public interface FunctionT<T, R, E extends Throwable> {
// 
//     R apply(T t) throws E;
// 
// }


import com.ning.http.client.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uk.ac.ic.wlgitbridge.util.FunctionT;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
package uk.ac.ic.wlgitbridge.io.http.ning;



public class NingHttpClient implements NingHttpClientFacade {

    private static final Logger log
            = LoggerFactory.getLogger(NingHttpClient.class);

    private final AsyncHttpClient http;

    public NingHttpClient(AsyncHttpClient http) {
        this.http = http;
    }

    @Override
    public <E extends Exception> byte[] get(
            String url,
// Path: src/main/java/uk/ac/ic/wlgitbridge/util/FunctionT.java
// @FunctionalInterface
// public interface FunctionT<T, R, E extends Throwable> {
// 
//     R apply(T t) throws E;
// 
// }


// Path: src/main/java/uk/ac/ic/wlgitbridge/io/http/ning/NingHttpClient.java
import com.ning.http.client.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uk.ac.ic.wlgitbridge.util.FunctionT;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.concurrent.ExecutionException;

package uk.ac.ic.wlgitbridge.io.http.ning;



public class NingHttpClient implements NingHttpClientFacade {

    private static final Logger log
            = LoggerFactory.getLogger(NingHttpClient.class);

    private final AsyncHttpClient http;

    public NingHttpClient(AsyncHttpClient http) {
        this.http = http;
    }

    @Override
    public <E extends Exception> byte[] get(
            String url,
            FunctionT<HttpResponseHeaders, Boolean, E> handler