mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
[BREAKING CHANGE] GET to POST: enhance document list capability (#7349)
### What problem does this PR solve? Enhance capability of `list_docs`. Breaking change: change method from `GET` to `POST`. ### Type of change - [x] Refactoring - [x] Enhancement with breaking change
This commit is contained in:
@ -70,7 +70,8 @@ def upload_file(auth, dataset_id, path):
|
||||
def list_document(auth, dataset_id):
|
||||
authorization = {"Authorization": auth}
|
||||
url = f"{HOST_ADDRESS}/v1/document/list?kb_id={dataset_id}"
|
||||
res = requests.get(url=url, headers=authorization)
|
||||
json = {}
|
||||
res = requests.post(url=url, headers=authorization, json=json)
|
||||
return res.json()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user