http请求工具
Project description
使用手册
快速开始
import httper
params = {
"a": 1,
"b": 2
}
# 发送get请求
httper.get("http://localhost:8080/test/get?id=1")
httper.get("http://localhost:8080/test/get?id=1", params)
httper.get("http://localhost:8080/test/get?id=1", params=params, timeout=10, headers={})
# 发送post请求
httper.post("http://localhost:8080/test/post?id=1")
httper.post("http://localhost:8080/test/post?id=1", params)
httper.post("http://localhost:8080/test/post?id=1", params=params, timeout=10, headers={})
# 发送post表单请求
httper.postForm("http://localhost:8080/test/postForm?id=1", params)
httper.postForm("http://localhost:8080/test/postForm?id=1", form=params, timeout=10, headers={})
# 下载文件
httper.getFile("http://localhost:8080/test/getFile?id=1", "test.py")
httper.getFile("http://localhost:8080/test/getFile?id=1", "test.py", progress=True)
httper.postFile("http://localhost:8080/test/postFile?id=1", "test.py")
httper.postFile("http://localhost:8080/test/postFile?id=1", "test.py", progress=True)
httper.downloadFile("http://localhost:8080/test/downloadFile?id=1", "test.py")
httper.downloadFile("http://localhost:8080/test/downloadFile?id=1", "test.py", progress=True)
# 上传文件
httper.uploadFile("http://localhost:8080/test/uploadFile?id=1", "file1", "./files/test.py")
httper.uploadFile("http://localhost:8080/test/uploadFile?id=1", "file1", open("./files/test.py"))
httper.uploadFile("http://localhost:8080/test/uploadFile?id=1", name="file1", file="[fileBytes]", fname="test.py")
httper.uploadFile("http://localhost:8080/test/uploadFile?id=1", name="file1",
file=("", open("./files/test.py", "rb"), "image/jpeg", {"refer": "localhost"}))
httper.uploadFile("http://localhost:8080/test/uploadFile?id=1", name="file1",
file=("new_filename.py", open("./files/test.py", "rb"), "image/jpeg", {"refer": "localhost"}))
httper.uploadImage("http://localhost:8080/test/uploadImage?id=1", "file2", "./files/img1.py")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
httper-0.0.1.tar.gz
(5.4 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
httper-0.0.1-py3.9.egg
(6.4 kB
view details)
File details
Details for the file httper-0.0.1.tar.gz.
File metadata
- Download URL: httper-0.0.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48759f4db3837937a77cfd580a14ac71678f263c1ff43b6ee327e3282c86c5ea
|
|
| MD5 |
174651d0f7055244c0bfcf035c1205ea
|
|
| BLAKE2b-256 |
9d0b26f7f32201eca6715421d28570fe2b82ed68611ce87c8a1329f213910f2a
|
File details
Details for the file httper-0.0.1-py3.9.egg.
File metadata
- Download URL: httper-0.0.1-py3.9.egg
- Upload date:
- Size: 6.4 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9883cfd62e79d880b67a9290a7599f54d1a5c40f05ffba4041a0f24e7c5ef064
|
|
| MD5 |
d459e3b98c73b1f95edc37337aa062da
|
|
| BLAKE2b-256 |
a431f8c5ff012da63af29d5645c09f45a9633210fd1f5b56214d474087e092d3
|
File details
Details for the file httper-0.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: httper-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bf1819b561c23e62fb64ae846e69e9c3ee6ca2d2c7bcc2fb81bea890ccbb30a
|
|
| MD5 |
9764b4e4af07c49a4ff2de9f50d74b00
|
|
| BLAKE2b-256 |
50ab95a99231fb8296e2f80f835343e18194926212c83467805263b17cb859ad
|