[progress Communities] [progress Openedge Abl] Forum Post: Re: Using .net To Get Data From...

  • Thread starter Thread starter mroberts@rev.com.au
  • Start date Start date
Status
Not open for further replies.
M

mroberts@rev.com.au

Guest
Migrated the above to 4GL ... mistook the request and the answer I provided was in C# (oops). OE did not like the casting of the repose to HttpWebResponse ... but removing that seemed to work. USING System.IO.*. USING System.Net.*. define variable req as System.Net.WebRequest no-undo. define variable resp as System.Net.WebResponse no-undo. define variable dataStream as System.IO.Stream no-undo. define variable reader as System.IO.StreamReader no-undo. define variable json as character no-undo. req = WebRequest:Create(" revdevelev:7060/.../applications"). req:Credentials = new NetworkCredential("tomcat","tomcat"). req:Method = "GET". resp = req:GetResponse(). dataStream = resp:GetResponseStream(). reader = new StreamReader(dataStream). json = reader:ReadToEnd().

Continue reading...
 
Status
Not open for further replies.
Back
Top