[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Include HTTPAPI into custom program without having LIBHTTP



   Hi Kim,
   It's possible to do this, but you're going to have to change HTTPAPI's
   compile process and your binding process to make it work.
   My idea of how HTTPAPI should be used is that you may have lots of
   programs calling HTTPAPI, so the code is placed into HTTPAPIR4, a
   service program that all of your programs can call whenever they need
   to make an HTTP request.  (Later, of course, I added on Expat XML
   parsing support, which additionally requires the EXPAT service
   program.)
   You don't need the LIBHTTP library (assuming you told HTTPAPI to use
   *LIBL).  But you will need to have the HTTPAPIR4 service program, and
   optionally, the EXPAT service program in your library list.  You can
   save and restore these objects along with your program, if you like.
   However, if you want to do what you're suggesting, and actually copy
   all of the code for HTTPAPI (and maybe also Expat) into your own
   program... that can be done...   but you'll need to change the INSTALL
   program for HTTPAPI to build the modules and keep them on disk, and
   then you'll need to bind to those modules "by copy" instead of by
   reference.  This will (as I'm sure you already know) copy the contents
   of the HTTPAPI modules into your *PGM object.

   On 3/11/2014 11:33 AM, Kim Hansen wrote:

   Hi!
   I'm new to RPG, compiling etc. but hope that you can help me, and hope
   the following makes sense:
   I wan't to use HTTPAPI for doing the following in my own RPG program
   (MYLIB/MYAPP):
   - Set proxy username/password
   - Get XML content from a url that uses basic authentication
   - Parse the XML and extract some of the XML into a string
   I can accomplish all of this as long as the LIBHTTP exists and I have
   run the INSTALL etc. according
   to [1][1]http://www.scottklement.com/httpapi/httpapi_savf.html.
   However, I would really much appreciate if it was possible to somehow
   only have my MYLIB/QRPGLESRC,MYAPP (RPGLE) where the custom code is,
   then create a module MYLIB/MYAPP (*MODULE) out of this and then create
   MYLIB/MYAPP (*PGM) out of the module. Then when the MYLIB/MYAPP (*PGM)
   is compiled successfully then be able to save my entire MYLIB into a
   SAVF and move it to another machine where LIBHTTP is not available.
   So basically I just need my own code, compile it against LIBHTTP
   somehow so that everything needed is compiled into MYLIB/MYAPP.
   Is this possible?
   Best regards,
   Kim

References

   1. [2]http://www.scottklement.com/httpapi/httpapi_savf.html


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
[3]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

References

   1. http://www.scottklement.com/httpapi/httpapi_savf.html
   2. http://www.scottklement.com/httpapi/httpapi_savf.html
   3. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------