mirror of
https://github.com/open-webui/docs
synced 2025-06-10 00:27:43 +00:00
handle encoding for json
Instead of using data=data, use json=data to ensure the requests library automatically handles the encoding for JSON:
This commit is contained in:
parent
b999c70f16
commit
7734e19e28
@ -62,7 +62,7 @@ To ensure secure access to the API, authentication is required 🛡️. You can
|
||||
}
|
||||
]
|
||||
}
|
||||
response = requests.post(url, headers=headers, data=data)
|
||||
response = requests.post(url, headers=headers, json=data)
|
||||
return response.json()
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user