The Artima Developer Community
Sponsored Link

Python Answers Forum
I have this problem with posting the data with POST or GET method types.

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
vinod kolapuram

Posts: 2
Nickname: vkolapuram
Registered: Mar, 2006

I have this problem with posting the data with POST or GET method types. Posted: Mar 28, 2006 10:13 AM
Reply to this message Reply
Advertisement
There is a CGIHTTPServer running on my machine. I wrote 2 python scripts, one will take the user input data and the other will process it. I tried using both GET and POST method types to post my data in the first script, but I don't know whats happening, the data is never received by the second sript.

I am using my machine for both server and client. For security reasons I am using port 8090 and not the default port for http. when I submit my data with GET option I can see it at the end of URL, but even then my second script does not read what I am sending.
I am just creating an instance of field storage and then calling the methods on it and printing the fieldNameList. But the list is always empty.

-----------------------------
fm =cgi.FieldStorage()
fieldNameList = fm.keys()
----------------------------
I have tried the basic examples straight from the book, but even then it always shows empty list.

I am wondering if there is some problem with python library which is running my web server.

To make sure my data is being sent properly I wrote a small server program and was running it on the same machine from DOS prompt. When I tried to run my first script to talk to this new server, it did display what I am sending.
I am unable to figure out what is the problem with CGIHTTPServer or the RequestHandler. I am just 2 weeks old in python and WebServer stuff.

Someone let me know if I am doing some basic mistake.

Thanks
Vinod

Topic: Form Data problem.... Continuation Previous Topic   Next Topic Topic: How do I call JUnit test cases from Python?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use