@@ -21,6 +21,8 @@ async def get_user_list(
2121 """ Get a list of things """
2222 url = "{}/tests/" .format (client .base_url ,)
2323
24+ headers : Dict [str , Any ] = client .get_headers ()
25+
2426 json_an_enum_value = []
2527 for an_enum_value_item_data in an_enum_value :
2628 an_enum_value_item = an_enum_value_item_data .value
@@ -39,7 +41,7 @@ async def get_user_list(
3941 }
4042
4143 async with httpx .AsyncClient () as _client :
42- response = await _client .get (url = url , headers = client . get_headers () , params = params ,)
44+ response = await _client .get (url = url , headers = headers , params = params ,)
4345
4446 if response .status_code == 200 :
4547 return [AModel .from_dict (item ) for item in cast (List [Dict [str , Any ]], response .json ())]
@@ -50,16 +52,20 @@ async def get_user_list(
5052
5153
5254async def upload_file_tests_upload_post (
53- * , client : Client , multipart_data : BodyUploadFileTestsUploadPost ,
55+ * , client : Client , multipart_data : BodyUploadFileTestsUploadPost , keep_alive : Optional [ bool ] = None ,
5456) -> Union [
5557 None , HTTPValidationError ,
5658]:
5759
5860 """ Upload a file """
5961 url = "{}/tests/upload" .format (client .base_url ,)
6062
63+ headers : Dict [str , Any ] = client .get_headers ()
64+ if keep_alive is not None :
65+ headers ["keep-alive" ] = keep_alive
66+
6167 async with httpx .AsyncClient () as _client :
62- response = await _client .post (url = url , headers = client . get_headers () , files = multipart_data .to_dict (),)
68+ response = await _client .post (url = url , headers = headers , files = multipart_data .to_dict (),)
6369
6470 if response .status_code == 200 :
6571 return None
@@ -78,10 +84,12 @@ async def json_body_tests_json_body_post(
7884 """ Try sending a JSON body """
7985 url = "{}/tests/json_body" .format (client .base_url ,)
8086
87+ headers : Dict [str , Any ] = client .get_headers ()
88+
8189 json_json_body = json_body .to_dict ()
8290
8391 async with httpx .AsyncClient () as _client :
84- response = await _client .post (url = url , headers = client . get_headers () , json = json_json_body ,)
92+ response = await _client .post (url = url , headers = headers , json = json_json_body ,)
8593
8694 if response .status_code == 200 :
8795 return None
0 commit comments