Solved

Post Vs. Get

Posted on 1997-05-22
4
161 Views
Last Modified: 2013-12-25
I'm writing a cgi script and posts and gets to other cgi scripts.
I know the GET command does something like this:
blah.cgi?string=value&string=value <--and so on
How does a POST work? I'm trying to manually type it in the same way and it doesn't work.. please help me.
0
Comment
Question by:chiefarcher
  • 2
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
pc012197 earned 100 total points
ID: 1828064
With POST, the argument string is piped to the standard input of the CGI script. The format of the argument string is the same as in the GET command.
The command-line equivalent of a CGI call with POST is

echo "string=value&string=value..."|blah.cgi

0
 

Author Comment

by:chiefarcher
ID: 1828065
But How would I be able to post it to the browser...
would I do a
http://whatever.com?"string=value&string=value"|blah.cgi
or how would I type this?
0
 
LVL 3

Expert Comment

by:pc012197
ID: 1828066
You can't simply write it into the URL. Some servers support this (they don't really care if a request is GET or POST - they simply use both mechanisms to transfer data to the CGI script. Therefore, *sometimes* it works with a simple
http://whatever.com/blah.cgi?string=value
Ususally it doesn't, though.)

So if you want to call a CGI script with arguments you have to use a FORM with METHOD=POST.

0
 

Author Comment

by:chiefarcher
ID: 1828067
thanks pc... for my company, I'm releasing a "submit-it" type program.. The cool thing is the user only has to hit the "Submit" button one time.  The only thing I'm having problems with is server's that have "post" set up rather than "get"

thanks..
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
EXCHANGE 2007, SCRIPTS 67 79
Automating a script for user accounts LINUX 14 73
Need some help with powershell script 5 49
How can i open a .fxp file 3 33
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question