Skip to content

lemori/pyrequest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

pyrequest

Light HTTP GET/POST wrapper for Python 2

#####Rebuild from MultipartPostHandler #####Feature: Simpler interface; supports posting Non-ASCII (dict)values and filenames. #####Author: [email protected]

Usage: webutil.request(url, data=None, has_files=False|True)

When has_files is False:
    data can be a relatively complicated structure, e.g.
    { "user": { "name": "bob", "age": "18"},
        "colors": ["red", "blue", "green"] }
When has_files is True:
    it POST with contenttype = multipart/form-data
    and data should be a simple dict, e.g.
    { "username" : "bob", "password" : "riviera",
        "file" : open("filepath", "rb") }
When data is None and has_files is False:
    it GET resources from the url

About

Light HTTP GET/POST wrapper for Python 2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages