Develop an HTTP client application in ABL
- Last Updated: February 16, 2026
- 3 minute read
- OpenEdge
- Version 13.0
- Documentation
HTTP and HTTP(S)
Hypertext Transfer Protocol (HTTP) enables client applications to communicate with server applications over the Internet in a standard way. A client application initiates the communication by sending a request message to a Uniform Resource Identifier (URI). The server application processes the request and returns a response message.
Web browsers use HTTP to access websites and end-user web applications. HTTP is also used in programmatic communications, such as REST and SOAP, where client applications send request messages to invoke methods or functions on the server application over the Internet.
HTTP(S) extends HTTP by adding a layer of security (the 'S' in HTTPS stands for Secure). Communication over HTTP(S) happens in a way that is very similar to HTTP; however request and response messages are encrypted before being sent.
To learn more about HTTP and HTTPS, see the following resources:
The OpenEdge.Net procedure library
The OpenEdge.Net procedure library
provides classes and interfaces that enable you to make HTTP requests and process
HTTP responses from within ABL code. It is included in the PROPATH by default when you create a new OpenEdge project in Progress
Developer Studio for OpenEdge. You can also find it in $DLC/tty/netlib (Unix and Windows) and $DLC/gui/netlib (Windows only).
The OpenEdge.Net library supports all
HTTP methods and all content types. It also supports HTTP authentication, Transport
Layer Security (TLS) communication, the use of HTTP proxies, and the development of
stateful HTTP clients using cookies.
OpenEdge.Net procedure
library. See the OpenEdge.NET.HTTP reference
documentation to learn about all the available classes, methods, and interfaces.
Additional code samples can be found on GitHub.Main steps
Perform the following steps to develop an ABL HTTP client:
- Build an HTTP requestUse the
OpenEdge.Net.HTTP.RequestBuilderclass to create a request object that implements theOpenEdge.Net.HTTP.IHttpRequestinterface. You must specify an HTTP method (GET, PUT, POST, etc) and a URI. For example:
You can optionally add HTTP headers and a request body. To learn more about these and other options, see Build an HTTP request.DEFINE VARIABLE oURI AS URI NO-UNDO. DEFINE VARIABLE oRequest AS IHttpRequest NO-UNDO. oURI = URI:Parse("http://oemobiledemo.progress.com/OEMobileDemoServices/rest/CustomerService/Customer?filter=CustNum=1"). oRequest = RequestBuilder:GET(oURI):Request. - Execute the HTTP requestTo execute the request, you need a client object and a request object. Use the
OpenEdge.Net.HTTP.ClientBuilderclass to create a client object that implements theOpenEdge.Net.HTTP.IHttpClientinterface. Then, call theExecute()method on the client object. For example:
You can also use the client object to perform other tasks such as setting cookies or specifying TLS properties. To learn more about these tasks, see Execute an HTTP request.DEFINE VARIABLE oClient AS IHttpClient NO-UNDO. DEFINE VARIABLE OResponse AS IHttpResponse NO-UNDO. oClient = ClientBuilder:Build():Client. oResponse = oClient:Execute(oRequest). - Process the HTTP responseDepending on your requirements, you may want to pass the HTTP response to another part of your ABL program, write it to a log file, or use it to query a database. The
OpenEdge.Netlibrary supports a wide variety of content types in an HTTP response. To learn more, see Process an HTTP response. In this example, the HTTP response is displayed through theMESSAGEstatement.IF oResponse:StatusCode <> 200 THEN RETURN ERROR "Request Error: " + STRING(oResponse:StatusCode). ELSE oJsonObject = CAST(oResponse:Entity, JsonObject). oJsonObject:Write(JsonString, true). MESSAGE string(JsonString).
Example
This example sends a GET request and processes a JSON response:
|
Additional resources
- Samples on GitHub
- OpenEdge.NET.HTTP reference documentation