Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
8d3f4559bd | |||
3f476bba5c | |||
5564513134 | |||
6292dde23b | |||
659f71c72c | |||
29214000c8 |
14
pom.xml
14
pom.xml
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.inteligr8</groupId>
|
||||
<artifactId>common-rest-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.0.2</version>
|
||||
<name>ReST API Client for Java</name>
|
||||
|
||||
<properties>
|
||||
@@ -50,18 +50,18 @@
|
||||
<version>${jersey.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.core</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-rs-client</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.core</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.inject</groupId>
|
||||
<artifactId>jersey-hk2</artifactId>
|
||||
|
@@ -2,6 +2,7 @@ package com.inteligr8.rs;
|
||||
|
||||
import javax.ws.rs.ext.RuntimeDelegate;
|
||||
|
||||
import org.glassfish.jersey.client.ClientProperties;
|
||||
import org.glassfish.jersey.client.proxy.WebResourceFactory;
|
||||
import org.glassfish.jersey.internal.RuntimeDelegateImpl;
|
||||
import org.slf4j.Logger;
|
||||
@@ -31,6 +32,13 @@ public abstract class ClientJerseyImpl extends Client implements InitializingBea
|
||||
this.logger.info("API Base URL: " + this.getConfig().getBaseUrl());
|
||||
}
|
||||
|
||||
@Override
|
||||
public javax.ws.rs.client.Client getClient() {
|
||||
return super.getClient()
|
||||
// allow PUT operations without body data
|
||||
.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getApi(Class<T> apiClass) {
|
||||
return WebResourceFactory.newResource(apiClass, this.getTarget());
|
||||
|
@@ -56,9 +56,9 @@ public abstract class OAuthRequestFilter implements ClientRequestFilter {
|
||||
form = this.createForm();
|
||||
}
|
||||
|
||||
form.param("clientId", this.clientId);
|
||||
form.param("client_id", this.clientId);
|
||||
if (this.clientSecret != null)
|
||||
form.param("clientSecret", this.clientSecret);
|
||||
form.param("client_secret", this.clientSecret);
|
||||
if (this.scope != null)
|
||||
form.param("scope", this.scope);
|
||||
|
||||
|
Reference in New Issue
Block a user