Answers for "golang curl api"

Go
0

golang curl api

reader := strings.NewReader(`{"body":123}`)
request, err := http.NewRequest("GET", "http://localhost:3030/foo", reader)
// TODO: check err
client := &http.Client{}
resp, err := client.Do(request)
// TODO: check err
Posted by: Guest on July-19-2020

Browse Popular Code Answers by Language