Hi. Sorry for this very clueless question, but how does one write
in Python an HTTP client that can send a POST request? The modules
I've found (e.g. urllib, urllib2), as far as I can tell, seem to
be limited to GET requests. (I could be wrong though; please
correct me if this is so.)
TIA!
kynn
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded. 4 4618
In <g2**********@reader2.panix.comkj <so***@987jk.com.invalidwrites:
>Hi. Sorry for this very clueless question, but how does one write in Python an HTTP client that can send a POST request? The modules I've found (e.g. urllib, urllib2), as far as I can tell, seem to be limited to GET requests. (I could be wrong though; please correct me if this is so.)
Sorry, my mistake. I now see that urllib2 handles POSTs too.
kynn
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
The original urllib module will do it too, if you pass a data keyword
argument to urllib.urlopen:
u = urllib.urlopen('http://www.domain.com/cgi-bin/cgi.py',
data=urllib.urlencode({'name': 'pythonguy'}))
On Fri, Jun 6, 2008 at 6:04 PM, kj <so***@987jk.com.invalidwrote:
In <g2**********@reader2.panix.comkj <so***@987jk.com.invalidwrites:
>>Hi. Sorry for this very clueless question, but how does one write in Python an HTTP client that can send a POST request? The modules I've found (e.g. urllib, urllib2), as far as I can tell, seem to be limited to GET requests. (I could be wrong though; please correct me if this is so.)
Sorry, my mistake. I now see that urllib2 handles POSTs too.
kynn
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
-- http://mail.python.org/mailman/listinfo/python-list
On Jun 7, 6:17 am, "Jeff McNeil" <j...@jmcneil.netwrote:
The original urllib module will do it too, if you pass a data keyword
argument to urllib.urlopen:
u = urllib.urlopen('http://www.domain.com/cgi-bin/cgi.py',
data=urllib.urlencode({'name': 'pythonguy'}))
On Fri, Jun 6, 2008 at 6:04 PM, kj <so...@987jk.com.invalidwrote:
In <g2cc24$63...@reader2.panix.comkj <so...@987jk.com.invalidwrites:
>Hi. Sorry for this very clueless question, but how does one write in Python an HTTP client that can send a POST request? The modules I've found (e.g. urllib, urllib2), as far as I can tell, seem to be limited to GET requests. (I could be wrong though; please correct me if this is so.)
Sorry, my mistake. I now see that urllib2 handles POSTs too.
kynn
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
-- http://mail.python.org/mailman/listinfo/python-list
check this link for http post: http://love-python.blogspot.com/2008...l-by-http.html
regards,
Subeen
Thanks to Jeff and subeen for the helpful comments and suggestions.
Kynn
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Erik T. Nomad |
last post by:
I've created a link that will enable the reader of any page on my
website to click it, enter an e-mail address, and have it arrive in
that inbox with a hyperlink to the site. However, I'm...
|
by: malborg |
last post by:
I have simple form in PHP with two input types as text to input login
name and password.PS: They use POST method. (index.php)
The other script(logowanie.php) checks if login and password is...
|
by: DigitalRick |
last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my
guestbook. It had been working fine untill I upgraded to Server 2003 (I am
also running Exchange 2003) all locally. I...
|
by: mark kurten |
last post by:
i have a requirement to send a soap message to a web service.
i'm familiar with the soap toolkit using vb.
i need to generate a xml document which i think i can do, but i don't know
how to...
|
by: Fatih BOY |
last post by:
Hi,
I want to send a report from a windows application to a web page like
'report.asp'
Currently i can send it via post method with a context like
local=En&Username=fatih&UserId=45&Firm=none...
|
by: eswanson |
last post by:
I have a web page I need to post a file plus some other fields to it. How
can I do this from a asp.net page. I know I can send individual fields to the
other page, but how do I send a file to the...
|
by: Zahid |
last post by:
Hi,
I have a number of structures that I want to send using
UDP protocol. How do I convert the structure into
bytes/array of bytes? Using UDP protocol is a MUST - a
Client Requirement.
Am I...
|
by: inferno2000 |
last post by:
Let's say if I want to send a http "Post" request to a url, and check
the http status code later. How should I write the code? I have found
example to use WinHttp to send "Get" request and check...
|
by: keith.schincke |
last post by:
I know I must be missing something basic. I am developing of Firefox
1.5 and am trying to to send a basic QUERY_STRING to a test CGI that
will print the data back to the brower:
I can print my...
|
by: ajaxcoder |
last post by:
Hi
In my project i had a login form and i am trying to send the username and password to the server for authentication using xmlHttpRequest. Hence i am using POST request but i am unable to send...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |