Skip to content

Commit be735f7

Browse files
committed
Additional headers with informations
1 parent bed7cf8 commit be735f7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
group 'pl.simpay.api'
6-
version '2.1'
6+
version '2.1.1'
77

88
repositories {
99
mavenCentral()

src/main/kotlin/pl/simpay/api/service/AuthInterceptor.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import okhttp3.Response
55

66
private const val SIM_KEY_HEADER = "X-SIM-KEY"
77
private const val SIM_PASSWORD_HEADER = "X-SIM-PASSWORD"
8+
private const val SIM_VERSION_HEADER = "X-SIM-VERSION"
9+
private const val SIM_PLATFORM_HEADER = "X-SIM-PLATFORM"
810

911
class AuthInterceptor(private val apiKey: String, private val simPassword: String) : Interceptor {
1012

@@ -13,6 +15,8 @@ class AuthInterceptor(private val apiKey: String, private val simPassword: Strin
1315
.newBuilder()
1416
.header(SIM_KEY_HEADER, apiKey)
1517
.header(SIM_PASSWORD_HEADER, simPassword)
18+
.header(SIM_VERSION_HEADER, "2.1.1")
19+
.header(SIM_PLATFORM_HEADER, "KOTLIN")
1620
.build()
1721
return chain.proceed(request)
1822
}

0 commit comments

Comments
 (0)