× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I actually have heard of it and even got it to try out but was nothing thinking of it as a way to do what I needed to do. I know it was a way to have an RPG app utilize a web service or go get an RSS feed and process it. As in my RPG app makes a request, gets the data back and does something. But never thought about it as a way to just do a POST and end.

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Nathan Andelin
Sent: Tuesday, June 01, 2010 1:35 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] use CGI to do a POST

Mike,

You must be the only person on EARTH who has not heard of Scott Klement's HTTPAPI utility <smile>.

Sorry, just my feeble attempt to inject a little humor.

-Nathan.



----- Original Message ----
From: Mike Cunningham <mike.cunningham@xxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Sent: Tue, June 1, 2010 9:59:16 AM
Subject: [WEB400] use CGI to do a POST

Is there a way to use RPG CGI to send data using a POST instead of passing it in the URL? I need to pass some data to another webserver without any end user intervention. I am currently doing that using a META tag as below and then write the REDIRECT page

/$REDIRECT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta HTTP-EQUIV="REFRESH" content="0; url=/%REFERRER%/&reference=/%SOURCE%/ - /%WCCDTTM%/&CCAmount=/%PAYMENT%/">
</head>
<body></body>
</html>

I am also being told I can't use javascript to accomplish my task because 1 out of 100,000 users will have javascript turned off so using a form with onload() is not an option.

Our asp developer says he just does this

If errLevel = 0 Then
Dim objWinHttp, strURL, retVal

strURL = "https://as400sec.pct.edu/cgidev2/securepay";

Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
objWinHttp.OPen "POST", strURL
objWinHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objWinHttp.Send strPostStream
retVal = objWinHttp.ResponseText
Response.Write retVal
'Response.End
End If


Is here an equivelent in RPG CGI?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.