
com.openrest.v1_1.OpenrestClient Maven / Gradle / Ivy
package com.openrest.v1_1;
import java.io.IOException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.api.client.http.HttpRequestFactory;
/** The Openrest client. */
public class OpenrestClient {
private final String apiUrl;
private final OpenrestProtocol protocol;
public OpenrestClient(HttpRequestFactory requestFactory, Integer connectTimeout, Integer readTimeout,
Integer numberOfRetries, String apiUrl) {
this.apiUrl = apiUrl;
protocol = new OpenrestProtocol(requestFactory, connectTimeout, readTimeout, numberOfRetries);
}
public T request(Request request, TypeReference> responseType) throws IOException, OpenrestException {
return protocol.post(apiUrl, request, responseType);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy