Skip to content

Commit

Permalink
Additional headers with informations
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGL committed Mar 31, 2023
1 parent c306b6b commit 08a2476
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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)
}

0 comments on commit 08a2476

Please sign in to comment.