Commit 94b97f0c authored by Chris Coughlin's avatar Chris Coughlin

Added set http client to RESTROIFinder

parent 8dc22973
......@@ -27,6 +27,7 @@ import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.client.HttpClient;
import org.json.JSONObject;
import java.io.Closeable;
......@@ -294,4 +295,12 @@ public class RESTROIFinder implements ROIFinder, AutoCloseable {
byte[] asBytes = Base64.getDecoder().decode(enc);
return gson.fromJson(new String(asBytes, "utf-8"), double[].class);
}
/**
* Sets the HTTPClient implementation to use.
* @param newClient new client
*/
public void setHttpClient(HttpClient newClient) {
Unirest.setHttpClient(newClient);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment