-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 查看邮件 API | ||
|
||
## 通过 HTTP API 查看邮件 | ||
|
||
这是一个 `python` 的例子,使用 `requests` 库查看邮件。 | ||
|
||
```python | ||
limit = 10 | ||
offset = 0 | ||
res = requests.post( | ||
f"http://localhost:8787/api/mails?limit={limit}&offset={offset}`;", | ||
json=send_body, headers={ | ||
"Authorization": f"Bearer {你的JWT密码}", | ||
# "x-custom-auth": "<你的网站密码>", # 如果启用了自定义密码 | ||
"Content-Type": "application/json" | ||
} | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters