[PR #463] [MERGED] Handle encoding for json in python example #548

Closed
opened 2026-10-18 14:12:54 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/docs/pull/463
Author: @ssweber
Created: 3/31/2025
Status: ✅ Merged
Merged: 3/31/2025
Merged by: @tjbck

Base: main ← Head: patch-1


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 docs/getting-started/api-endpoints.md (+1 -1)

📄 Description

Instead of using data=data, use json=data to ensure the requests library automatically handles the encoding for JSON.

Before this change it has error:

{'detail': [{'type': 'json_invalid', 'loc': ['body', 0], 'msg': 'JSON decode error', 'input': {}, 'ctx': {'error': 'Expecting value'}}]}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/docs/pull/463 **Author:** [@ssweber](https://github.com/ssweber) **Created:** 3/31/2025 **Status:** ✅ Merged **Merged:** 3/31/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`7734e19`](https://github.com/open-webui/docs/commit/7734e19e285fd0a9189b0f3fac3c78e2fbcbdc91) handle encoding for json ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/getting-started/api-endpoints.md` (+1 -1) </details> ### 📄 Description Instead of using data=data, use json=data to ensure the requests library automatically handles the encoding for JSON. Before this change it has error: ``` {'detail': [{'type': 'json_invalid', 'loc': ['body', 0], 'msg': 'JSON decode error', 'input': {}, 'ctx': {'error': 'Expecting value'}}]} ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 14:12:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/docs#548
No description provided.