Created
March 12, 2017 04:11
-
-
Save entyo/f0d9bab9ef2577e2f3b19bddbfd5aa14 to your computer and use it in GitHub Desktop.
http.Responseのbodyを見たいとき
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bodyの確認 | |
body, err := ioutil.ReadAll(resp.Body) | |
if err != nil { | |
log.Fatalln(err) | |
} | |
fmt.Printf("body: " + string(body) + "\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment