I\'m trying to Decode XML from body a html response.
=>I saved this response body as string to a Variable and successfully decoded Using xml.Unmarshal Functio
If you already read the Body io.ReadCloser once (with conts1, err := ioutil.ReadAll(resp1.Body)
), you cannot ask another function to read it again (or you will get the EOF
error message).
I saved this response body as string to a Variable and successfully decoded Using xml.Unmarshal Function.
That seems the easiest approach to use the body content multiple times.