Connect to URL and dump webpage in Groovy

dumpgroovyurlwebpage

I would like to open a webpage from groovy, dump the specified webpage and eventually dump the webpage behind an anchor tag.

Does anybody has some sample code for this?

Best Answer

here is a variation

println 'http://www.google.com'.toURL().text