fix: mishandling of request header Content-Length for GET method

This commit is contained in:
debugtalk
2020-06-29 18:24:24 +08:00
parent d6be5215d1
commit 74c0f3e86d
2 changed files with 3 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
- fix: missing setup/teardown hooks for referenced testcase
- fix: compatibility for `black` on Android termux that does not support multiprocessing well
- fix: mishandling of request header `Content-Length` for GET method
**Changed**

View File

@@ -51,8 +51,8 @@ class TRequest(BaseModel):
url: Url
params: Dict[Text, Text] = {}
headers: Headers = {}
req_json: Union[Dict, List] = Field({}, alias="json")
data: Union[Text, Dict[Text, Any]] = ""
req_json: Union[Dict, List] = Field(None, alias="json")
data: Union[Text, Dict[Text, Any]] = None
cookies: Cookies = {}
timeout: float = 120
allow_redirects: bool = True