use of org.apache.archiva.rest.api.services.NetworkProxyService in project archiva by apache.
the class AbstractArchivaRestTest method getNetworkProxyService.
protected NetworkProxyService getNetworkProxyService() {
NetworkProxyService service = JAXRSClientFactory.create(getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", NetworkProxyService.class, Collections.singletonList(new JacksonJaxbJsonProvider()));
WebClient.client(service).header("Authorization", authorizationHeader);
WebClient.client(service).header("Referer", "http://localhost:" + port);
WebClient.getConfig(service).getHttpConduit().getClient().setReceiveTimeout(300000);
WebClient.client(service).accept(MediaType.APPLICATION_JSON_TYPE);
WebClient.client(service).type(MediaType.APPLICATION_JSON_TYPE);
return service;
}
Aggregations