Skip to content

Commit 947cd7d

Browse files
committed
Additional headers with informations
1 parent 053bedb commit 947cd7d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
group 'pl.simpay'
6-
version '2.1'
6+
version '2.1.1'
77
sourceCompatibility = '17'
88

99
repositories {

src/main/java/pl/simpay/api/service/AuthInterceptor.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ class AuthInterceptor implements Interceptor {
1212

1313
private static final String SIM_KEY_HEADER = "X-SIM-KEY";
1414
private static final String SIM_PASSWORD_HEADER = "X-SIM-PASSWORD";
15+
private static final String SIM_VERSION_HEADER = "X-SIM-VERSION";
16+
private static final String SIM_PLATFORM_HEADER = "X-SIM-PLATFORM";
1517

1618
private final String apiKey;
1719
private final String simPassword;
1820

1921
@NotNull
2022
@Override
2123
public Response intercept(@NotNull Chain chain) throws IOException {
22-
var authRequest = chain.request().newBuilder().header(SIM_KEY_HEADER, apiKey).header(SIM_PASSWORD_HEADER, simPassword).build();
24+
var authRequest = chain.request().newBuilder().header(SIM_KEY_HEADER, apiKey).header(SIM_PASSWORD_HEADER, simPassword).header(SIM_VERSION_HEADER, "2.1.1").header(SIM_PLATFORM_HEADER, "JAVA").build();
2325
return chain.proceed(authRequest);
2426
}
2527
}

0 commit comments

Comments
 (0)