I want to use request.Body(type io.ReadCloser) which is containing a image.
request.Body(type io.ReadCloser)
I dont want to use ioutil.ReadAll() as i want to write this bod
ioutil.ReadAll()
When you call ReadAll it's going to empty the buffer, so the second call will always return nothing. What you could do is save the result of ReadAll and reuse that in your functions. For example:
ReadAll
bytes, _ := ioutil.ReadAll(r); log.Println(string(bytes))