[Tutor] preferred httprequest library
Martin A. Brown
martin at linux-ip.net
Fri May 9 00:54:04 CEST 2014
Hello,
: I¹m new to python but not so much to programming. I need to
: construct a set or programs to test a forms poster that has been
: enhanced (it is in php). I mostly need http get and post. This
: is a hands on set of tests and does not have to be bullet proof.
:
: What would be a good http request library to use for this work?
There are many options. When you can afford to suck the entire
remote resource into memory (as with many applications), you will
probably find the 'requests' library very handy. I'd start here,
avoiding grabbing for the standard library tools (urllib, and
urllib2) unless you need that finer control.
This has a nice abstraction and, from your description, I think this
would be a good fit:
http://docs.python-requests.org/en/latest/
-Martin
--
Martin A. Brown
http://linux-ip.net/
More information about the Tutor
mailing list