@@ -3307,15 +3307,15 @@ async def _iter():
33073307 return
33083308
33093309 return AsyncHttpResponse (response = _response , data = _iter ())
3310- await _response .aread ()
3310+ await _response .read ()
33113311 if _response .status_code == 400 :
33123312 raise BadRequestError (
33133313 headers = dict (_response .headers ),
33143314 body = typing .cast (
33153315 typing .Any ,
33163316 construct_type (
33173317 type_ = typing .Any , # type: ignore
3318- object_ = _response .json (),
3318+ object_ = await _response .json (),
33193319 ),
33203320 ),
33213321 )
@@ -3326,7 +3326,7 @@ async def _iter():
33263326 typing .Any ,
33273327 construct_type (
33283328 type_ = typing .Any , # type: ignore
3329- object_ = _response .json (),
3329+ object_ = await _response .json (),
33303330 ),
33313331 ),
33323332 )
@@ -3337,7 +3337,7 @@ async def _iter():
33373337 typing .Any ,
33383338 construct_type (
33393339 type_ = typing .Any , # type: ignore
3340- object_ = _response .json (),
3340+ object_ = await _response .json (),
33413341 ),
33423342 ),
33433343 )
@@ -3348,7 +3348,7 @@ async def _iter():
33483348 typing .Any ,
33493349 construct_type (
33503350 type_ = typing .Any , # type: ignore
3351- object_ = _response .json (),
3351+ object_ = await _response .json (),
33523352 ),
33533353 ),
33543354 )
@@ -3359,7 +3359,7 @@ async def _iter():
33593359 typing .Any ,
33603360 construct_type (
33613361 type_ = typing .Any , # type: ignore
3362- object_ = _response .json (),
3362+ object_ = await _response .json (),
33633363 ),
33643364 ),
33653365 )
@@ -3370,7 +3370,7 @@ async def _iter():
33703370 typing .Any ,
33713371 construct_type (
33723372 type_ = typing .Any , # type: ignore
3373- object_ = _response .json (),
3373+ object_ = await _response .json (),
33743374 ),
33753375 ),
33763376 )
@@ -3381,7 +3381,7 @@ async def _iter():
33813381 typing .Any ,
33823382 construct_type (
33833383 type_ = typing .Any , # type: ignore
3384- object_ = _response .json (),
3384+ object_ = await _response .json (),
33853385 ),
33863386 ),
33873387 )
@@ -3392,7 +3392,7 @@ async def _iter():
33923392 typing .Any ,
33933393 construct_type (
33943394 type_ = typing .Any , # type: ignore
3395- object_ = _response .json (),
3395+ object_ = await _response .json (),
33963396 ),
33973397 ),
33983398 )
@@ -3403,7 +3403,7 @@ async def _iter():
34033403 typing .Any ,
34043404 construct_type (
34053405 type_ = typing .Any , # type: ignore
3406- object_ = _response .json (),
3406+ object_ = await _response .json (),
34073407 ),
34083408 ),
34093409 )
@@ -3414,7 +3414,7 @@ async def _iter():
34143414 typing .Any ,
34153415 construct_type (
34163416 type_ = typing .Any , # type: ignore
3417- object_ = _response .json (),
3417+ object_ = await _response .json (),
34183418 ),
34193419 ),
34203420 )
@@ -3425,7 +3425,7 @@ async def _iter():
34253425 typing .Any ,
34263426 construct_type (
34273427 type_ = typing .Any , # type: ignore
3428- object_ = _response .json (),
3428+ object_ = await _response .json (),
34293429 ),
34303430 ),
34313431 )
@@ -3436,14 +3436,14 @@ async def _iter():
34363436 typing .Any ,
34373437 construct_type (
34383438 type_ = typing .Any , # type: ignore
3439- object_ = _response .json (),
3439+ object_ = await _response .json (),
34403440 ),
34413441 ),
34423442 )
3443- _response_json = _response .json ()
3443+ _response_json = await _response .json ()
34443444 except JSONDecodeError :
34453445 raise ApiError (
3446- status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text
3446+ status_code = _response .status_code , headers = dict (_response .headers ), body = await _response .text ()
34473447 )
34483448 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response_json )
34493449
@@ -4062,15 +4062,15 @@ async def _iter():
40624062 return
40634063
40644064 return AsyncHttpResponse (response = _response , data = _iter ())
4065- await _response .aread ()
4065+ await _response .read ()
40664066 if _response .status_code == 400 :
40674067 raise BadRequestError (
40684068 headers = dict (_response .headers ),
40694069 body = typing .cast (
40704070 typing .Any ,
40714071 construct_type (
40724072 type_ = typing .Any , # type: ignore
4073- object_ = _response .json (),
4073+ object_ = await _response .json (),
40744074 ),
40754075 ),
40764076 )
@@ -4081,7 +4081,7 @@ async def _iter():
40814081 typing .Any ,
40824082 construct_type (
40834083 type_ = typing .Any , # type: ignore
4084- object_ = _response .json (),
4084+ object_ = await _response .json (),
40854085 ),
40864086 ),
40874087 )
@@ -4092,7 +4092,7 @@ async def _iter():
40924092 typing .Any ,
40934093 construct_type (
40944094 type_ = typing .Any , # type: ignore
4095- object_ = _response .json (),
4095+ object_ = await _response .json (),
40964096 ),
40974097 ),
40984098 )
@@ -4103,7 +4103,7 @@ async def _iter():
41034103 typing .Any ,
41044104 construct_type (
41054105 type_ = typing .Any , # type: ignore
4106- object_ = _response .json (),
4106+ object_ = await _response .json (),
41074107 ),
41084108 ),
41094109 )
@@ -4114,7 +4114,7 @@ async def _iter():
41144114 typing .Any ,
41154115 construct_type (
41164116 type_ = typing .Any , # type: ignore
4117- object_ = _response .json (),
4117+ object_ = await _response .json (),
41184118 ),
41194119 ),
41204120 )
@@ -4125,7 +4125,7 @@ async def _iter():
41254125 typing .Any ,
41264126 construct_type (
41274127 type_ = typing .Any , # type: ignore
4128- object_ = _response .json (),
4128+ object_ = await _response .json (),
41294129 ),
41304130 ),
41314131 )
@@ -4136,7 +4136,7 @@ async def _iter():
41364136 typing .Any ,
41374137 construct_type (
41384138 type_ = typing .Any , # type: ignore
4139- object_ = _response .json (),
4139+ object_ = await _response .json (),
41404140 ),
41414141 ),
41424142 )
@@ -4147,7 +4147,7 @@ async def _iter():
41474147 typing .Any ,
41484148 construct_type (
41494149 type_ = typing .Any , # type: ignore
4150- object_ = _response .json (),
4150+ object_ = await _response .json (),
41514151 ),
41524152 ),
41534153 )
@@ -4158,7 +4158,7 @@ async def _iter():
41584158 typing .Any ,
41594159 construct_type (
41604160 type_ = typing .Any , # type: ignore
4161- object_ = _response .json (),
4161+ object_ = await _response .json (),
41624162 ),
41634163 ),
41644164 )
@@ -4169,7 +4169,7 @@ async def _iter():
41694169 typing .Any ,
41704170 construct_type (
41714171 type_ = typing .Any , # type: ignore
4172- object_ = _response .json (),
4172+ object_ = await _response .json (),
41734173 ),
41744174 ),
41754175 )
@@ -4180,7 +4180,7 @@ async def _iter():
41804180 typing .Any ,
41814181 construct_type (
41824182 type_ = typing .Any , # type: ignore
4183- object_ = _response .json (),
4183+ object_ = await _response .json (),
41844184 ),
41854185 ),
41864186 )
@@ -4191,14 +4191,14 @@ async def _iter():
41914191 typing .Any ,
41924192 construct_type (
41934193 type_ = typing .Any , # type: ignore
4194- object_ = _response .json (),
4194+ object_ = await _response .json (),
41954195 ),
41964196 ),
41974197 )
4198- _response_json = _response .json ()
4198+ _response_json = await _response .json ()
41994199 except JSONDecodeError :
42004200 raise ApiError (
4201- status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text
4201+ status_code = _response .status_code , headers = dict (_response .headers ), body = await _response .text ()
42024202 )
42034203 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response_json )
42044204
0 commit comments