Skip to content

Commit

Permalink
client: change deploy-agent version header
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermebr committed Aug 11, 2017
1 parent 967aa7a commit 696187e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,5 @@ func (c Client) url(path string) string {
func (c Client) setHeaders(req *http.Request) {
req.Header.Set("Authorization", fmt.Sprintf("bearer %s", c.Token))
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
req.Header.Set("x-Agent-Version", version)
req.Header.Set("X-Agent-Version", version)
}
4 changes: 2 additions & 2 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (s *S) TestClient(c *check.C) {
call++
c.Assert(r.Header.Get("Authorization"), check.Not(check.Equals), "")
c.Assert(r.Header.Get("Content-Type"), check.Equals, "application/x-www-form-urlencoded")
c.Assert(r.Header.Get("x-Agent-Version"), check.Equals, version)
c.Assert(r.Header.Get("X-Agent-Version"), check.Equals, version)
c.Assert(r.URL.Path, check.Equals, "/apps/test/units/register")
b, err := ioutil.ReadAll(r.Body)
c.Assert(err, check.IsNil)
Expand Down Expand Up @@ -77,7 +77,7 @@ func (s *S) TestClientSendDiff(c *check.C) {
call++
c.Assert(r.Header.Get("Authorization"), check.Not(check.Equals), "")
c.Assert(r.Header.Get("Content-Type"), check.Equals, "application/x-www-form-urlencoded")
c.Assert(r.Header.Get("x-Agent-Version"), check.Equals, version)
c.Assert(r.Header.Get("X-Agent-Version"), check.Equals, version)
c.Assert(r.URL.Path, check.Equals, "/apps/test/diff")
b, err := ioutil.ReadAll(r.Body)
c.Assert(err, check.IsNil)
Expand Down

0 comments on commit 696187e

Please sign in to comment.