User Agent do not contain bridge version, only client in format

This commit is contained in:
Michal Horejsek
2020-04-27 14:28:40 +02:00
committed by James Houlahan
parent 1d49a484a8
commit 984b28e8f9
23 changed files with 125 additions and 74 deletions

View File

@ -26,13 +26,8 @@ import (
)
// NewRequest creates a new request.
func (c *client) NewRequest(method, path string, body io.Reader) (req *http.Request, err error) {
req, err = http.NewRequest(method, c.cm.GetRootURL()+path, body)
if req != nil {
req.Header.Set("User-Agent", CurrentUserAgent)
}
return
func (c *client) NewRequest(method, path string, body io.Reader) (*http.Request, error) {
return http.NewRequest(method, c.cm.GetRootURL()+path, body)
}
// NewJSONRequest create a new JSON request.