git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/branches/common/common-jaxrs-client/1.0@169365 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9c83e567c4
commit
226fcbf002
2
pom.xml
2
pom.xml
|
@ -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>
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue