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.