Skip to content

Commit fa2e93b

Browse files
authored
Merge pull request #86 from taboola/RequestHeadersSupplier
Add RequestHeadersSupplier
2 parents a23a401 + 2835b03 commit fa2e93b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<modelVersion>4.0.0</modelVersion>
77
<groupId>com.taboola</groupId>
88
<artifactId>backstage-api-java-client</artifactId>
9-
<version>1.1.9</version>
9+
<version>1.1.10</version>
1010

1111
<name>${project.groupId}:${project.artifactId}</name>
1212
<description>Backstage API Java Client</description>
@@ -53,7 +53,7 @@
5353
<log4j.core.version>2.17.1</log4j.core.version>
5454
<junit.version>4.13.1</junit.version>
5555
<mockito.all.version>1.10.19</mockito.all.version>
56-
<api.java.client.core.version>1.0.6</api.java.client.core.version>
56+
<api.java.client.core.version>1.0.7</api.java.client.core.version>
5757
</properties>
5858

5959
<dependencies>

src/main/java/com/taboola/backstage/Backstage.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import com.taboola.rest.api.model.CommunicationInterceptor;
4747
import com.taboola.rest.api.model.NoOpCommunicationInterceptor;
4848
import com.taboola.rest.api.model.RequestHeader;
49+
import com.taboola.rest.api.model.RequestHeadersSupplier;
4950

5051
/**
5152
* Backstage is the gateway object to all services.
@@ -183,7 +184,7 @@ public static class BackstageBuilder {
183184
private static final String DEFAULT_BACKSTAGE_HOST = "https://backstage.taboola.com/backstage/";
184185
private static final String DEFAULT_AUTH_BACKSTAGE_HOST = "https://authentication.taboola.com/authentication/";
185186
private static final String DEFAULT_USER_AGENT = "Taboola Java Client";
186-
private static final String VERSION = "1.1.9";
187+
private static final String VERSION = "1.1.10";
187188
private static final SerializationConfig DEFAULT_SERIALIZATION_CONFIG = new SerializationConfig();
188189
private static final CommunicationInterceptor DEFAULT_COMMUNICATION_INTERCEPTOR = new NoOpCommunicationInterceptor();
189190
private String baseUrl;
@@ -199,6 +200,7 @@ public static class BackstageBuilder {
199200
private Boolean organizeDynamicColumns;
200201
private SerializationConfig serializationConfig;
201202
private Collection<RequestHeader> headers;
203+
private RequestHeadersSupplier headersSupplier;
202204
private CommunicationInterceptor communicationInterceptor;
203205

204206
public BackstageBuilder setBaseUrl(String baseUrl) {
@@ -266,6 +268,11 @@ public BackstageBuilder setHeaders(Collection<RequestHeader> headers){
266268
return this;
267269
}
268270

271+
public BackstageBuilder setHeadersSupplier(RequestHeadersSupplier headersSupplier){
272+
this.headersSupplier = headersSupplier;
273+
return this;
274+
}
275+
269276
public BackstageBuilder setCommunicationInterceptor(CommunicationInterceptor communicationInterceptor) {
270277
this.communicationInterceptor = communicationInterceptor;
271278
return this;
@@ -284,6 +291,7 @@ public Backstage build() {
284291
.setWriteTimeoutMillis(writeTimeoutMillis)
285292
.setSerializationConfig(serializationConfig)
286293
.setHeaders(headers)
294+
.setHeadersSupplier(headersSupplier)
287295
.setKeepAliveDurationMillis(keepAliveDurationMillis)
288296
.setExceptionFactory(new BackstageAPIExceptionFactory(objectMapper))
289297
.setUserAgentSuffix(userAgent)

0 commit comments

Comments
 (0)