Yiyiyimu commented on issue #1388: URL: https://github.com/apache/apisix-dashboard/issues/1388#issuecomment-771579959
Thanks for the suggestions @starsz! 1. It's in that [commit](https://github.com/apache/apisix/pull/3404/commits/d0ca10d461fd493311a265f5db53a6297ae0c8fe), and would be something like ```go func getWithoutTest(g *WithT, path string, headers map[string]string) string { client := &http.Client{} url := host + path req, err := http.NewRequest(http.MethodGet, url, nil) g.Expect(err).To(BeNil()) for key, value := range headers { req.Header.Add(key, value) } resp, err := client.Do(req) g.Expect(err).To(BeNil()) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) g.Expect(err).To(BeNil()) return string(body) } ``` 2. It seems the default printer is already the most simple one - `CompactPrinter` (see [code](https://github.com/gavv/httpexpect/blob/master/expect.go#L255-L263)). So there seems no better option for using `httpexpect` 😿 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
