use of org.nhindirect.monitor.providers.TxJSONProvider in project nhin-d by DirectProject.
the class TestUtils method getResource.
public static WebResource getResource(String serviceURL) {
final ClientConfig config = new DefaultClientConfig();
config.getSingletons().add(new TxJSONProvider());
// need to set timeouts so we don't block forever in the event of a bad URL or hung web server
config.getProperties().put(ClientConfig.PROPERTY_CONNECT_TIMEOUT, CONNECTION_TIMEOUT);
config.getProperties().put(ClientConfig.PROPERTY_READ_TIMEOUT, READ_TIMEOUT);
final Client client = Client.create(config);
WebResource resource = client.resource(serviceURL);
return resource;
}
Aggregations