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

 


Article

Is there an HTTP client for OpenEdge?

« Go Back

Information

 
Article Number000060873
EnvironmentProduct: OpenEdge
Version: 11.5.1, 11.6, 11.7.x, 12.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.
How to consume a REST Service from an ABL/4GL character based application?
How to make HTTP(S) requests from ABL applications
Using and ABL Client to Consume REST Web Service (HTTP)
How to make a HTTPS 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?
Why do deployed ABL applications using HTTP(S) requests fail with error 12886
 

 

Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution

OpenEdge 11.5.1 introduced an official HTTP / REST client which allows HTTP(S) requests from ABL applications:

OpenEdge Development: Programming Interfaces, Input/Output Processes, Making HTTP(S) requests from ABL applications
https://documentation.progress.com/output/OpenEdge117/openedge117/#page/dvpin%2Fmaking-http(s)-requests-from-abl-applications.html

The HTTP Client feature is installed as the OpenEdge.Net.pl procedure library:

  • HTTP Client is included with all client run-time (GUI, TTY, batch and AppServer) and Development products
  • OpenEdge.Net.pl is added in the DLC/gui/netlib, DLC/tty/netlib install directories and the source is in DLC/src/netlib. 
  • This procedure library is added to the PROPATH as part of the install tailoring for Development environments, but the OpenEdge.Net.pl needs to  be added to the PROPATH as part of Client application deployment procedures which will otherwise fail with error 12886.  Refer to Article: 000095515, OpenEdge.Net.pl is missing from PROPATH  


Using the HTTP Client

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:
000100412, How to POST an empty request using OpenEdge HttpClient?

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

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):

000095515, OpenEdge.Net.pl is missing from PROPATH
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 Date1/3/2020 3:56 PM