Groovy web console

subscribe to the feed Subscribe
to this
site
asdf (via #groovywebconsole)
tweet this snippet Tweet
this
script

asdf

Published 1 month ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def test = 'http://google.com'
def uc = (HttpURLConnection) new URL(test).openConnection();
uc.setConnectTimeout(2000);	uc.setRequestProperty("Content-Type", "application/json");
	uc.setRequestProperty("Accept", "application/json");

	uc.setDoOutput(true);