I want to use request.Body(type io.ReadCloser) which is containing a image.
I dont want to use ioutil.ReadAll() as i want to write this bod
Technically, on one reader, you cannot read multiple times.
This will print twice.
package main
import (
"io/ioutil"
"log"
"strings"
)
func main() {
r := strings.NewReader("some io.Reader stream to be read\n")
stringData, _ := ioutil.ReadAll(r)
log.Println(stringData)
log.Println(stringData)
}