PROGRAM-ID. webcontent. CONFIGURATION SECTION. REPOSITORY. class jBufferedReader as "java.io.BufferedReader" class jInputStreamReader as "java.io.InputStreamReader" class jURL as "java.net.URL" class jURLConnection as "java.net.URLConnection" class jString as "java.lang.String" class jSystem as "java.lang.System" . WORKING-STORAGE SECTION. 77 url object reference jURL. 77 uc object reference jURLConnection. 77 bf object reference jBufferedReader. 77 inputLine object reference jString. PROCEDURE DIVISION. main. try set url to jURL:>new ("https://www.veryant.com") set uc to url:>openConnection() set bf to jBufferedReader:>new (jInputStreamReader:>new(uc:>getInputStream())) perform until exit set inputLine to bf:>readLine() if inputLine = null exit perform end-if jSystem:>out:>println (inputLine) end-perform catch exception exception-object:>printStackTrace() end-try. GOBACK. |