File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 1010- ** 编码自适应** :自动检测文本文件的编码格式
1111- ** 易于集成** :简单的API接口,易于集成到现有系统中
1212
13- ## 安装依赖 (如果函数报错则安装,默认不需要安装)
13+ ## 安装依赖
1414``` bash
1515pip install python-docx pdfplumber
1616```
Original file line number Diff line number Diff line change 1919- 后端服务集成:调用第三方接口时,需统一错误捕获与结构化结果处理,减少重复代码。
2020- 日常接口调试:快速发送 HTTP 请求,自动处理编码与 JSON 解析,提升调试效率。
2121
22- ## 二、环境准备 (如报错,则需要安装依赖)
22+ ## 二、环境准备
2323
2424### 2.1 依赖库
2525
4343pip install requests chardet
4444```
4545
46+ ## 参数说明
4647
48+ ### 必需参数
49+
50+ | 参数名 | 类型 | 说明 | 示例 |
51+ | :------- | :--- | :-------------- | :------------------------------------- |
52+ | ` method ` | str | HTTP 请求方法 | ` 'GET' ` , ` 'POST' ` , ` 'PUT' ` , ` 'DELETE' ` |
53+ | ` url ` | str | 请求的 URL 地址 | ` 'https://api.example.com/endpoint' ` |
54+
55+ ### 可选参数
56+
57+ | 参数名 | 类型 | 默认值 | 说明 | |
58+ | :---------- | :----- | :----- | :----------------------------------- | ----------------------------------- |
59+ | ` params ` | String | None | URL 查询参数,数据类型json字符串 | ` {"page": 1, "limit": 10} ` |
60+ | ` data ` | String | None | 请求体数据(表单数据)或者josn字符串 | ` {"key": "value"} ` |
61+ | ` json_data ` | String | None | JSON 请求体数据,数据类型json字符串 | ` {"name": "John"} ` |
62+ | ` headers ` | String | None | 请求头信息,数据类型json字符串, | ` {"Authorization": "Bearer token"} ` |
4763
4864## 注意事项
4965
You can’t perform that action at this time.
0 commit comments