diff --git a/pom.xml b/pom.xml
index ead6807..d65c98e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
4.0.0
com.taboola
backstage-api-java-client
- 1.1.9
+ 1.1.10
${project.groupId}:${project.artifactId}
Backstage API Java Client
@@ -53,7 +53,7 @@
2.17.1
4.13.1
1.10.19
- 1.0.6
+ 1.0.7
diff --git a/src/main/java/com/taboola/backstage/Backstage.java b/src/main/java/com/taboola/backstage/Backstage.java
index 97490cd..e9b113f 100644
--- a/src/main/java/com/taboola/backstage/Backstage.java
+++ b/src/main/java/com/taboola/backstage/Backstage.java
@@ -46,6 +46,7 @@
import com.taboola.rest.api.model.CommunicationInterceptor;
import com.taboola.rest.api.model.NoOpCommunicationInterceptor;
import com.taboola.rest.api.model.RequestHeader;
+import com.taboola.rest.api.model.RequestHeadersSupplier;
/**
* Backstage is the gateway object to all services.
@@ -183,7 +184,7 @@ public static class BackstageBuilder {
private static final String DEFAULT_BACKSTAGE_HOST = "https://backstage.taboola.com/backstage/";
private static final String DEFAULT_AUTH_BACKSTAGE_HOST = "https://authentication.taboola.com/authentication/";
private static final String DEFAULT_USER_AGENT = "Taboola Java Client";
- private static final String VERSION = "1.1.9";
+ private static final String VERSION = "1.1.10";
private static final SerializationConfig DEFAULT_SERIALIZATION_CONFIG = new SerializationConfig();
private static final CommunicationInterceptor DEFAULT_COMMUNICATION_INTERCEPTOR = new NoOpCommunicationInterceptor();
private String baseUrl;
@@ -199,6 +200,7 @@ public static class BackstageBuilder {
private Boolean organizeDynamicColumns;
private SerializationConfig serializationConfig;
private Collection headers;
+ private RequestHeadersSupplier headersSupplier;
private CommunicationInterceptor communicationInterceptor;
public BackstageBuilder setBaseUrl(String baseUrl) {
@@ -266,6 +268,11 @@ public BackstageBuilder setHeaders(Collection headers){
return this;
}
+ public BackstageBuilder setHeadersSupplier(RequestHeadersSupplier headersSupplier){
+ this.headersSupplier = headersSupplier;
+ return this;
+ }
+
public BackstageBuilder setCommunicationInterceptor(CommunicationInterceptor communicationInterceptor) {
this.communicationInterceptor = communicationInterceptor;
return this;
@@ -284,6 +291,7 @@ public Backstage build() {
.setWriteTimeoutMillis(writeTimeoutMillis)
.setSerializationConfig(serializationConfig)
.setHeaders(headers)
+ .setHeadersSupplier(headersSupplier)
.setKeepAliveDurationMillis(keepAliveDurationMillis)
.setExceptionFactory(new BackstageAPIExceptionFactory(objectMapper))
.setUserAgentSuffix(userAgent)