From 08a2476a4eea544860afbc49da33935daf4a92dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Wi=C4=99cek?= Date: Fri, 31 Mar 2023 22:27:49 +0200 Subject: [PATCH] Additional headers with informations --- rest.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rest.go b/rest.go index de2a1ff..5ae64a4 100644 --- a/rest.go +++ b/rest.go @@ -10,6 +10,8 @@ import ( const ( SimKeyHeader = "X-SIM-KEY" SimPasswordHeader = "X-SIM-PASSWORD" + SimVersionHeader = "X-SIM-VERSION" + SimPlatformHeader = "X-SIM-PLATFORM" BaseUrl = "https://api.simpay.pl" ContentType = "application/json" ) @@ -61,5 +63,7 @@ type interceptor struct { func (i interceptor) RoundTrip(r *http.Request) (*http.Response, error) { r.Header.Set(SimKeyHeader, i.apikey) r.Header.Set(SimPasswordHeader, i.simKey) + r.Header.Set(SimVersionHeader, "2.1.1") + r.Header.Set(SimPlatformHeader, "GO") return i.core.RoundTrip(r) }