P
Peter Judge
Guest
This will work , of course, but only on Windows . Note that the design of the HTTP library completely hides the fact that you're using sockets. The API used to make requests is completely technology-agnostic (so one could switch out the socket-based engine with something else). -- peter From: chrisrichardson [mailto:bounce-chrisrichardson@community.progress.com] Sent: Wednesday, 01 April, 2015 04:06 To: TU.OE.Development@community.progress.com Subject: RE: [Technical Users - OE Development] Rest Client in OE 11.5? RE: Rest Client in OE 11.5? Reply by chrisrichardson Thanks Peter, will check this out. In the mean time I put this together based on some examples on here and elsewhere. This has got me going for now (I didn't want to go down to socket route!) using System.*. def var HttpClient as class System.Net.WebClient. def var webResponse as longchar no-undo. fix-codepage (webResponse) = "UTF-8". def var appKey as char no-undo initial "MyAppKey". HttpClient = new System.Net.WebClient(). HttpClient
roxy:Credentials = System.Net.CredentialCache
efaultNetworkCredentials. HttpClient:Headers:Add("key",'"' + appKey + '"' ). webResponse = HttpClient
ownloadString(" http://api.worldbank.org/countries?format=json "). HttpClient
ispose(). delete object HttpClient. message string(webResponse) view-as alert-box. Stop receiving emails on this subject. Flag this post as spam/abuse.
Continue reading...
Continue reading...