SyntaxFix
Write A Post
Hire A Developer
Questions
The method you're using to read the http body response returns a byte slice:
func ReadAll(r io.Reader) ([]byte, error)
official documentation
You can convert []byte to a string by using
[]byte
body, err := ioutil.ReadAll(resp.Body) bodyString := string(body)