Search in sources :

Example 1 with NetworkProxyService

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;
}
Also used : JacksonJaxbJsonProvider(com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider) NetworkProxyService(org.apache.archiva.rest.api.services.NetworkProxyService)

Aggregations

JacksonJaxbJsonProvider (com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider)1 NetworkProxyService (org.apache.archiva.rest.api.services.NetworkProxyService)1