Skip to content

Commit 2eb0fb3

Browse files
committed
updated comments and header setting order
1 parent b717ffb commit 2eb0fb3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

go/rtl/auth.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,16 @@ func (s *AuthSession) Do(result interface{}, method, ver, path string, reqPars m
128128
return err
129129
}
130130

131-
// set content-type header
131+
// set headers
132132
req.Header.Add("Content-Type", contentTypeHeader)
133+
134+
if options != nil && options.AgentTag != "" {
135+
req.Header.Set("User-Agent", options.AgentTag)
136+
}
133137

134138
// set query params
135139
setQuery(req.URL, reqPars)
136140

137-
if options != nil && options.AgentTag != "" {
138-
req.Header.Set("User-Agent", options.AgentTag)
139-
}
140141

141142
// do the actual http call
142143
res, err := s.Client.Do(req)

0 commit comments

Comments
 (0)