How to make HTTP requests from COBOL

How to make HTTP requests from COBOL?

For example, how can I create GET , POST requests for http://example.com ?


Relevant information about what I have on my machine:

 $ cobc --version cobc (OpenCOBOL) 1.1.0 Copyright (C) 2001-2009 Keisuke Nishida / Roger While Built Nov 02 2013 00:16:01 Packaged Feb 06 2009 10:30:55 CET $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS" 
+5
source share
1 answer
Steve Williams, as part of his work with a level of training, but useful, COBOL sources, has published several examples that cover socket programming using GnuCOBOL.

The list is too long, but the RESTClient sample is worth reading and learning.

http://sourceforge.net/p/open-cobol/discussion/help/thread/762285b2/7ada/attachment/RESTclient.tar.gz

This is not the only way to handle the HTTP request / response in COBOL, but it is working code and a comfortable foot.

See http://sourceforge.net/p/open-cobol/discussion/contrib/thread/2b474086 for a related conversation on SourceForge.

+4
source

Source: https://habr.com/ru/post/1204666/


All Articles