Page History
...
We recommend using the free community edition of Intellij. Download and install the Scala plugin according to the directions. Then follow instructions for creating a Scala project and an object like the following. Change the URL to whatever CTS2 service is available
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
package mayo.edu.cts2.client.rest.scala import java.net.{HttpURLConnection, URL} import io.Source /** * Created with IntelliJ IDEA. * Author: Scott Bauer bauer.scott@mayo.edu * Date: 10/2/12 * Time: 3:17 PM */ object CTS2RestClient extends App{ val connection = new URL("http://informatics.mayo.edu/cts2/rest/valuesets").openConnection().asInstanceOf[HttpURLConnection] val inputStream = connection.getInputStream val src = Source.fromInputStream(inputStream) src.getLines().foreach(println) } |
...