This commit is contained in:
Lucio Lelii 2018-06-20 15:27:08 +00:00
parent 9c83e567c4
commit 226fcbf002
3 changed files with 2 additions and 7 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.common</groupId>
<artifactId>common-jaxrs-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<name>gcube-jaxrs-client</name>
<parent>

View File

@ -22,12 +22,9 @@ public class JaxRSRequestFilter implements ClientRequestFilter {
@Override
public void filter(final ClientRequestContext rc) throws IOException {
System.out.println("request intercepted");
if (ScopeProvider.instance.get()!=null){
Request requestContext = Interceptors.executeRequestChain(service.call());
for (Entry<String, String> entry: requestContext.getHeaders()){
System.out.println("setting "+entry.getKey()+" "+entry.getValue());
rc.getHeaders().put(entry.getKey(), Collections.singletonList((Object)entry.getValue()));
}
}

View File

@ -30,9 +30,7 @@ public class TargetFactory implements TargetFactoryDSL.AtClause{
try{
Client client = ClientBuilder.newClient().property(ClientProperties.FOLLOW_REDIRECTS, Boolean.FALSE);
System.out.println("address is "+address);
/*
String resourceAddress = address.substring(0, address.indexOf("/service"));