[Progress Communities] [Progress OpenEdge ABL] Forum Post: Calling REST API from Progress Client

Status
Not open for further replies.
A

anandknr

Guest
I am exploring the possible options of accesssing a REST API via OpenEdge ChUI client. My progress version is 11.7.4 and after going through progress tutorials I opted to use OpenEdge Http client ( OpenEdge.Net.pl ). USING OpenEdge.Net.HTTP.IHttpRequest. USING OpenEdge.Net.HTTP.IHttpResponse. USING OpenEdge.Net.HTTP.ClientBuilder. USING OpenEdge.Net.HTTP.RequestBuilder. DEFINE VARIABLE oRequest AS IHttpRequest NO-UNDO. DEFINE VARIABLE oResponse AS IHttpResponse NO-UNDO. oRequest = RequestBuilder:Get(' www.progress.com/'):Request . oResponse = ClientBuilder:Build():Client:Execute(oRequest). MESSAGE oResponse:StatusCode SKIP oResponse:StatusReason SKIP VIEW-AS ALERT-BOX. But I am getting below error if I execute from Procedure Editor. Secure Socket Layer (SSL) failure. error code -3829: SSL routines (9318) Connection failure for host www.progress.com port 443 transport TCP. (9407) response-data-received.txt created was blank. Then instead (of Software for Great Digital Experiences | Progress Software) I used another API ( http://api.worldbank.org/countries?format=json ) which will return a json data. (Through broswer I have confirmed it.) But through OE Client it gave oResponse:StatusCode as 403 and oResponse:StatusMessage as "Forbidden". This time response-data-received.txt was created with below content. HTTP/1.1 403 Forbidden Server: squid/3.5.20 Mime-Version: 1.0 Date: Tue, 03 Sep 2019 11:38:22 GMT Content-Type: text/html;charset=utf-8 Content-Length: 3655 X-Squid-Error: ERR_ACCESS_DENIED 0 Vary: Accept-Language Content-Language: en X-Cache: MISS from cppra00a0288.erferf.com X-Cache-Lookup: NONE from cppra00a0288.erferf.com:0 Via: 1.1 cppra00a0288.erferf.com (squid/3.5.20) Connection: keep-alive ERROR: The requested URL could not be retrieved ERROR The requested URL could not be retrieved The following error was encountered while trying to retrieve the URL: Access Denied. Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect. Your cache administrator is root . Generated Tue, 03 Sep 2019 11:38:22 GMT by cppra00a0288.erferf.com (squid/3.5.20) Can someone help me to identify the issue here? Is it because calling a http data from SSL client?

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