Skip to content

Commit 08a2476

Browse files
committed
Additional headers with informations
1 parent c306b6b commit 08a2476

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rest.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import (
1010
const (
1111
SimKeyHeader = "X-SIM-KEY"
1212
SimPasswordHeader = "X-SIM-PASSWORD"
13+
SimVersionHeader = "X-SIM-VERSION"
14+
SimPlatformHeader = "X-SIM-PLATFORM"
1315
BaseUrl = "https://api.simpay.pl"
1416
ContentType = "application/json"
1517
)
@@ -61,5 +63,7 @@ type interceptor struct {
6163
func (i interceptor) RoundTrip(r *http.Request) (*http.Response, error) {
6264
r.Header.Set(SimKeyHeader, i.apikey)
6365
r.Header.Set(SimPasswordHeader, i.simKey)
66+
r.Header.Set(SimVersionHeader, "2.1.1")
67+
r.Header.Set(SimPlatformHeader, "GO")
6468
return i.core.RoundTrip(r)
6569
}

0 commit comments

Comments
 (0)