Using post method with webjames
Terry Swanborough (61) 150 posts |
Hi I am using webjames at the moment and testing CGI scripts using BASIC I have no problem accessing the result from a get method by using the Query string How do I access the returned information with BASIC using the post method I have looked and can find TIA |
Rick Murray (539) 13401 posts |
There is a demo called “parameters”. Copy this into /cgi-bin (if it isn’t already there). Write a simple form:
Use it. The nuts and bolts are in !WebJames.cgi-lib; thought it might be simpler to treat that as a “black box”. The “parameters” program shows how to read the parameters from a POST request. I have the example temporarily running at http://heyrick.ddns.net/formtest.html It will redirect, when you click submit, to /cgi-bin/params (it’s the same program, I just named it params in my setup). Now, here’s the good bit. It extracted the POST parameters. If you do /cgi-bin/params?trump=moron it will reply with the parameters equally extracted from a GET request. So your program can be agnostic to the actual request type; though there are ways to tell what the request type is. |
Terry Swanborough (61) 150 posts |
Hi Rick I knew the answer would be in right in front of me. Thanks again for the reply, I was scratching my head for a while before I posted. |