HTTPAPI (LIBHTTP) on IBM i is excellent!
HTTPAPI is an IBM i library (LIBHTTP) containing a full set of API’s allowing any IBM i programmer to write webservices to read, write and tinker ("tinker" is a technical term) with cloud based applications.
YES – using the Opensource HTTPAPI application you can easily read and write to Cloud Webservices direct from your RPG CODE
For example, you could use the HTTPAPI library to easily add a few lines of RPGLE code to an IBM i program, letting you validate a USPS postal address in real time (by calling the GOOGLE address validation webservice).
HTTPAPI is written by Scott Klement and is Open Source.
In Scott’s words
" Download HTTP API source: This is an RPG IV service program that uses socket calls to implement the HTTP 1.1 protocol. The HTTP protocol is the data transfer protocol that is used to transfer documents over the World Wide Web. This service program can, optionally, also do “https” (HTTP over SSL) requests to an SSL-enhanced web server. This is a powerful utility with many uses, so I’m opening it up to the world. Since this has only been tested for a few applications with a few servers, I’m looking for people to help out with testing, documentation and maybe even with new features. Have Fun! "
In short – HTTPAPI is a free application that which you simply download and install on your IBM i system. This will then let you add HTTPAPI commands to your programs, granting the ability to access internet webservices very easily.
I’m a huge fan of Scotts’s excellent API interface for talking to webservices. It makes the whole thing so simple; it feels transparent. It comes with a handful of sample RPGLE code snippets to let you easily grasp the concepts of making an existing RPG program easily talk to something out there on the internet, or out there on a server in your company network.
Thats it… now look at the various example programs and you will quickly see how easy it is to build a SOAP or REST program (containing your XML/JSON data string that you want to send to the web service) and then send it, get a response back and voila!