I have used net/http package to get url html response, it works fine until now.
but when I get one page that use Ajax to fill some html element, I could not get all contents of html page.
How can use http.Get that will wait page load completely then get whole web page contents. Thanks!
response, err := http.Get(url)
if err != nil {
fmt.Printf("%s", err)
os.Exit(1)
} else {
defer response.Body.Close()
contents, err := ioutil.ReadAll(response.Body)
if err != nil {
fmt.Printf("%s", err)
os.Exit(1)
}
fmt.Printf("%s
", string(contents))
}