Skip to content

Commit 45a579a

Browse files
authored
Merge pull request #176 from iceking2nd/master
fix deserialization error when api was not en-US
2 parents 310bff3 + 0f60ca3 commit 45a579a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

main.go

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66

77
const authHeaderName = "Authorization"
88
const authHeaderFormat = "Token %v"
9+
const languageHeaderName = "Accept-Language"
10+
const languageHeaderValue = "en-US"
911

1012
func NewAPIClientFor(host string, token string) *APIClient {
1113
cfg := NewConfiguration()
@@ -17,5 +19,10 @@ func NewAPIClientFor(host string, token string) *APIClient {
1719
fmt.Sprintf(authHeaderFormat, token),
1820
)
1921

22+
cfg.AddDefaultHeader(
23+
languageHeaderName,
24+
languageHeaderValue,
25+
)
26+
2027
return NewAPIClient(cfg)
2128
}

0 commit comments

Comments
 (0)