Solved

Post Vs. Get

Posted on 1997-05-22
4
164 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

730 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