This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
use(function() { | |
var url = this.api, | |
getRequest = new org.apache.commons.httpclient.methods.GetMethod(url), | |
client = new org.apache.commons.httpclient.HttpClient(), | |
status = new org.apache.commons.httpclient.HttpStatus(), | |
inputStream; | |
console.log("Retrieving data from " + url); | |
try { | |
var statusCode = client.executeMethod(getRequest); |