use of org.apache.gobblin.r2.R2RestResponseHandler in project incubator-gobblin by apache.
the class R2RestWriterBuilder method fromConfig.
@Override
public R2RestWriterBuilder fromConfig(Config config) {
config = config.withFallback(FALLBACK);
this.client = createClient(config);
String urlTemplate = config.getString(HttpConstants.URL_TEMPLATE);
String verb = config.getString(HttpConstants.VERB);
String protocolVersion = config.getString(HttpConstants.PROTOCOL_VERSION);
asyncRequestBuilder = new R2RestRequestBuilder(urlTemplate, verb, protocolVersion);
Set<String> errorCodeWhitelist = HttpUtils.getErrorCodeWhitelist(config);
responseHandler = new R2RestResponseHandler(errorCodeWhitelist, metricContext);
return this;
}
Aggregations