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

HTTPAPI to SSL Website



OK, long story short: we have a requirement to interact with a web site from the IBM i, effectively acting as a browser. The site doesn't offer a web service to accomplish what we need, so we need to receive the HTML, pick through it for what we're looking for, and send back posts as if someone was sitting at a browser. The intent is to run this from within a "green-screen application.

I'm building several "prototypes" so that I can learn / test as I go, and I've hit my first major roadblock - the host server is telling me that my session has timed out.

The basic call structure of the program is as follows:


http_persist_open()

https_init( APP_ID )

http_persist_get() <= which works great!

http_url_encoder_new() <= to send some data on the post (I think)

http_url_encoder_addvar_s() <= just one piece of data...

http_url_encoder_getptr

http_persist_post() <= the page that comes back here says that my session has timed out / expired.

http_url_encoder_free()

https_cleanup()

http_persist_close()


I've tried various combinations of persistent sessions, etc., and this seems to work "the best". I've run the session under debug, and (to my untrained eye) everything "appears" to work OK, with the exception that the host site thinks that my session has expired. I can replicate this behavior with a browser if I sit on the site for a while, then try to get to the page that I'm requesting from the i.

If I'm just doing it wrong, I can live with that - this is my first real foray into HTTPAPI! Any assistance would be welcomed. If you need actual source code, debug files, etc., just LMK.

Thanks,

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