Last active
April 25, 2017 09:12
-
-
Save iCoolchar/83b74afb02dc6010574c1ec2dfe2d7f9 to your computer and use it in GitHub Desktop.
read http request 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
client := &http.Client{} | |
req, _ := http.NewRequest("GET", url, nil) | |
res, err := client.Do(req) | |
bodyBytes, _ := ioutil.ReadAll(res.Body) | |
fmt.Println("body is", string(bodyBytes)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment