Skip to content

Instantly share code, notes, and snippets.

@robertotambunan
Created June 13, 2020 08:25
Show Gist options
  • Save robertotambunan/b255193f1bd47947105ee35658258cdb to your computer and use it in GitHub Desktop.
Save robertotambunan/b255193f1bd47947105ee35658258cdb to your computer and use it in GitHub Desktop.
dataURLNation:= "https://api.kawalcorona.com/"
req, err := http.NewRequest("GET", dataURLNation, nil)
if err != nil {
log.Println("NewRequest: ", err)
return
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Println("Do: ", err)
return
}
defer resp.Body.Close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment