Skip to content

Instantly share code, notes, and snippets.

View StefanKrecher's full-sized avatar

Stefan Krecher StefanKrecher

View GitHub Profile
@StefanKrecher
StefanKrecher / GET-Request+JFrame.st
Created January 5, 2012 15:13
Ambrhino (Smalltalk/Amber-, Java-, Javascript-Mixture) example: makes HTTP-GET-Request & display result on a JFrame
| url con is isr br line content pane frame |
<importPackage(java.net)>.
<importPackage(java.io)>.
url := <new URL('http://www.esvapi.org/v2/rest/passageQuery?key=IP&passage=Psalm+23&include-headings=false')>.
con := url openConnection.
is := con getInputStream.
isr := <new InputStreamReader(is)>.
br := <new BufferedReader(isr)>.
content := ''.
line := ''.