轻量级HTTP GET/POST工具 py2request

码农软件 · 软件分类 · 网络工具包 · 2019-02-26 10:43:56

软件介绍

py2request 是轻量级 HTTP GET/POST 工具(适用于Python 2)

基于 MultipartPostHandler

特征: 简单的接口; 支持发送含非ASCII字符的(dict)values和文件名.

用法:pyrequest.request(url, data=None, has_files=False|True)

1、当`has_files`为否时,`data`可以是一个相对复杂的dict表单结构,例如:
    `{ "user": { "name": "bob", "age": "18"}, "colors": ["red", "blue", "green"] }`
2、当`has_files`为真时,`data`必须是简单的表单结构:
    `{ "username" : "bob", "password" : "riviera", "file" : open("filepath", "rb") }`
3、当`data`为`None`并且`has_files`为`False`时,便会使用GET请求。

本文地址:https://codercto.com/soft/d/163.html

The Science of Programming

The Science of Programming

David Gries / Springer / 1989-4-21 / USD 99.00

Describes basic programming principles and their step-by- step applications.Numerous examples are included.一起来看看 《The Science of Programming》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

html转js在线工具
html转js在线工具

html转js在线工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换