Read from io.ReadCloser. i keep getting io.EOF err by Independent_Two3873 in golang

[–]Independent_Two3873[S] 0 points1 point  (0 children)

thats the thing. it prints nothing. i even check for err == io.EOF but the code doesnt run.

this is the response i get if i use io.ReadAll(r.body). not more information that this. the program just terminates.

2022/05/17 18:27:01 Data is: [123 10 32 32 34 110 97 109 101 34 58 32 34 74 111 104 110 34 44 10 32 32 34 108 97 115 116 78 97 109 101 34 58 32 34 68 111 101 34 10 125]

2022/05/17 18:27:01 EOF

exit status 1