By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,587 Members | 1,677 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,587 IT Pros & Developers. It's quick & easy.

Accessing POST parameters from BaseHTTPServer

P: n/a
Hi all,
I'm writing a super simple little debugging HTTP server which simply
returns the path and parameters it receives requests for.

E.g. requesting /meth?a=b returns something like:
Command: GET
Path: /meth
Params: {'a': ['b']}

This is fine for GET, but I can't see how I access parameters passed
by POST requests...

The particular client programme I'm testing will be passing stuff up
as text/xml, if that's any help...

Thanks!
James
Nov 6 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
James wrote:
Hi all,
I'm writing a super simple little debugging HTTP server which simply
returns the path and parameters it receives requests for.

E.g. requesting /meth?a=b returns something like:
Command: GET
Path: /meth
Params: {'a': ['b']}

This is fine for GET, but I can't see how I access parameters passed
by POST requests...

The particular client programme I'm testing will be passing stuff up
as text/xml, if that's any help...
You read the standard input and decode them according to the relevant
RFC. The source of the cgi module could be enlightening there. You might
even consider importing it and using it ...

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Nov 7 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.