Enhancement: `_one_request` should return raw response
- 主要语言
- Python
- 星标
- 1.5k
- 派生
- 397
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 6
描述
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your feature request related to a problem? Please describe.
`_one_request` in common/rest.py returns `response.json()` when `response.text` is not empty. However, this can lead to issues when implementing routes that require the raw response. Furthermore, for empty responses (`response.text = ""`), a NoneType is returned which does not contain status code information.
The methods affected are
`download_trade_document_for_account_by_id` in `broker/client`
`cancel_order_by_id` in `trading/client`
`cancel_journal` in `broker/client`
### Describe the solution you'd like.
_No response_
### Describe an alternate solution.
_No response_
### Anything else? (Additional Context)
_No response_
贡献指南
评估
这个 Issue 还没有评估数据。