From 3760bb0a61b56aa3b4c4d137e17298f4f8648d72 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sat, 21 Jan 2017 14:19:57 -0800 Subject: [PATCH] Simplify HTTP GETs when not adding Accept header --- compy_test.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/compy_test.go b/compy_test.go index 9fdcdc6..8352b3e 100644 --- a/compy_test.go +++ b/compy_test.go @@ -112,10 +112,7 @@ func (s *CompyTest) TestBrotli(c *C) { } func (s *CompyTest) TestJpeg(c *C) { - req, err := http.NewRequest("GET", s.server.URL+"/image/jpeg", nil) - c.Assert(err, IsNil) - - resp, err := s.client.Do(req) + resp, err := s.client.Get(s.server.URL + "/image/jpeg") c.Assert(err, IsNil) defer resp.Body.Close() c.Assert(resp.StatusCode, Equals, 200) @@ -141,10 +138,7 @@ func (s *CompyTest) TestJpegToWebP(c *C) { } func (s *CompyTest) TestPng(c *C) { - req, err := http.NewRequest("GET", s.server.URL+"/image/png", nil) - c.Assert(err, IsNil) - - resp, err := s.client.Do(req) + resp, err := s.client.Get(s.server.URL + "/image/png") c.Assert(err, IsNil) defer resp.Body.Close() c.Assert(resp.StatusCode, Equals, 200)