What's the easiest way to get the result of an HTTP GET request in using URL in JRuby
- by sipwiz
I'm attempting to build a Tropo Ruby application and I need to retrieve the result of an HTTPS GET. The Tropo platform doesn't have the httpclient Ruby gem so I can't use that. The Ruby engine used is JRuby so a suggestion has been to make use of the Java URL class to do the request. I've played around with it a little bit and I seem to be able to create the URL object ok but am now struggling with how to get the results of executing the request. How do I do it?
javaURL = java.net.URL.new svcURL
transferResult = javaURL.getContent()