Article

Is there an HTTP client for OpenEdge?

« Go Back

Information

 
Article Number000060873
EnvironmentProduct: OpenEdge
Version: 11.5.1, 11.6, 11.7.x
OS: All supported platforms
Other: HTTP client
Question/Problem Description
Is there an HTTP client for OpenEdge ?
Is there a REST client for OpenEdge ?
How to call a REST Service from an OpenEdge client.
How to communicate with an HTTP server using the OpenEdge client.
Is there a way to consume a REST Service from an ABL/4GL character based application?
ABL Client to Consume REST Web Service
ABL Client to Consume REST WebService
How to make a HTTP call from an OpenEdge ABL client with authentication?
How to make a HTTP GET request using SSL from an ABL client?
How to use ABL API to call / consume REST services?
Is there an ABL API to interact with http server / services?
Could not find class or interface OpenEdge.Net.URI. (12886)
 

 

Steps to Reproduce
Clarifying Information
Error MessageCould not find class or interface OpenEdge.Net.URI. (12886)
Defect/Enhancement Number
Cause
Resolution

An official HTTP / REST client has been introduced in OpenEdge 11.5.1 and allows making HTTP(S) requests from ABL applications.

The HTTP client is installed with all client run-time (GUI, TTY, batch and AppServer) and development products as the OpenEdge.Net.pl procedure library in the netlib subdirectory. 

This feature is documented at: 
https://docs.progress.com/bundle/openedge-api-reference/page/Making-HTTPS-requests-from-ABL-applications.html

Below are a number of examples of usage:

Making Requests:

Simple GET Request:
000096507, How to perform a simple GET request using the HttpClient?

Simple POST Request:
000096508, How to create a POST request using the OpenEdge HttpClient?

Post an empty message:
000096510, How to POST an empty request using OpenEdge HttpClient?

Consuming REST Web Services using OpenEdge ABL Client:
000093320, How to consume a REST Webservice from an OpenEdge Client?

Setting Options:

Set a Connect Timeout Value(in Milliseconds):
000096511, How to set the Connection Timeout for a request using OpenEdge HttpClient?

Set Socket Options to be used by the HttpClient Socket:
000096513, How to set socket options using OpenEdge HttpClient?

Default values for HttpClient Timeouts/Retries Options:
000076956, What are the defaults for HTTP client timeouts/retries ?

Using -nohostverify using OpenEdge HttpClient:
000068449, How to use -nohostverify with the ABL HTTPClient?

PASOE:

Fetch a list of Applications from a PASOE instance:
000095195, How to call into the OEManager's REST API for insight into PASOE?
000096651, How to get the list of applications from a PASOE Agent using OE Manager's REST API?

Handling Responses:

Working with MultiPart Messages using the HttpClient:
000094426, How to work with MultiPart Messages using HttpClient?

Overriding default MultiPartEntityWriter in HttpClient:
000094417, Example - Overriding default MultiPartEntityWriter in httpClient

Parsing an XML Document returned by the HttpClient:
000079838, How to parse XML document received via HTTP client ?

HttpClient Support for Compressed (gzip) Messages:
000063850, Does OpenEdge Httpclient support compressed (gzip) messages ?
000088502, Handling compressed/zipped responses in httpclient.

Troubleshooting:

Logging Raw HTTP messages with OpenEdge HttpClient:
000077744, How to log raw HTTP messages with OpenEdge Http client

Security:

Creating a Client Principal that is useful to both ABL Clients and Browsers:
000085125, How to create a CP usable by both ABL clients and browsers.

Using HTTP Authentication using the HttpClient:
000094419, How to use HTTP authentication with the HTTP client?

Using Basic Authentication using the HttpClient:
000077798, How to use Basic Authentication with HTTP client ?

Post a form-encoded message based on a series of name-value pairs:
000096509, How to post a FORM-ENCODED message using OpenEdge HttpClient?

Set SSL Ciphers and Protocols to use in a Request:
000096512, How to set SSL Ciphers and Protocols in OpenEdge HttpClient?
 

Workaround
Customers on OpenEdge versions between 10.2x and 11.5 could use the .NET HttpClient. However, unlike the ABL HTTP Client, this code can only be used on Windows platforms.
 
USING System.*. 

DEFINE VARIABLE HttpClient AS CLASS System.Net.WebClient. 
DEFINE VARIABLE webResponse AS LONGCHAR NO-UNDO. 
FIX-CODEPAGE (webResponse) = "UTF-8". 

HttpClient = NEW System.Net.WebClient(). 
HttpClient:Proxy:Credentials = System.Net.CredentialCache:DefaultNetworkCredentials. 

webResponse = HttpClient:DownloadString("https://api.trade.gov/consolidated_screening_list/search?api_key=yourAPIKey&q=chemical"). 

HttpClient:Dispose(). 
DELETE OBJECT HttpClient. 

MESSAGE STRING(webResponse) VIEW-AS ALERT-BOX.
Notes

References to Other Documentation:

Progress Article(s):

000061983, Error 12886 when running a HTTP request from an ABL application
000096507, How to perform a simple GET request using the HttpClient?
000096508, How to create a POST request using the OpenEdge HttpClient?
000096509, How to post a FORM-ENCODED message using OpenEdge HttpClient?
000096510, How to POST an empty request using OpenEdge HttpClient?
000094419, How to use HTTP authentication with the HTTP client?
000077798, How to use Basic Authentication with HTTP client ?
000096511, How to set the Connection Timeout for a request using OpenEdge HttpClient?
000096512, How to set SSL Ciphers and Protocols in OpenEdge HttpClient?
000096513, How to set socket options using OpenEdge HttpClient?
000076956, What are the defaults for HTTP client timeouts/retries ?
000068449, How to use -nohostverify with the ABL HTTPClient?
000095195, How to call into the OEManager's REST API for insight into PASOE?
000096651, How to get the list of applications from a PASOE Agent using OE Manager's REST API?
000094426, How to work with MultiPart Messages using HttpClient?
000094417, Example - Overriding default MultiPartEntityWriter in httpClient
000079838, How to parse XML document received via HTTP client ?
000085125, How to create a CP usable by both ABL clients and browsers.
000093320, How to consume a REST Webservice from an OpenEdge Client?
000094426, How to work with MultiPart Messages using HttpClient?
000063850, Does OpenEdge Httpclient support compressed (gzip) messages ?
000088502, Handling compressed/zipped responses in httpclient.
000077744, How to log raw HTTP messages with OpenEdge Http client

OpenEdge 11.5.1: New Information, Chapter 12. "Making HTTP(S) requests from ABL applications"

This documentation for the OpenEdge ABL HTTP Client libraries is located at the following location: https://documentation.progress.com/output/oehttpclient/index.html

OpenEdge 11.6: https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/dvpin/making-http(s)-requests-from-abl-applications.html

PUG Challenge Exhange Americas: The world is your oyster. Calling REST services from ABL, http://pugchallenge.org/downloads2015/410_The_world_is_your_oyster_REST_Out.pdf
Last Modified Date6/5/2019 3:48 PM


Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025