Skip to content

Instantly share code, notes, and snippets.

@ntung
Forked from kdabir/get_content.groovy
Created April 25, 2017 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntung/9abb5ba04a72329bbfeceda2c6e863d0 to your computer and use it in GitHub Desktop.
Save ntung/9abb5ba04a72329bbfeceda2c6e863d0 to your computer and use it in GitHub Desktop.
get content from url and write to a file in groovy
// saving from url to a file (append)
new File("output.xml") << new URL ("http://some.url/some/path.xml").getText()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment