Makes the HTTP request (synchronous) :param method: Method to call. :param url: Path to method endpoint. :param header_params: Header parameters to be placed in the request header. :param body: Request body. :param post_params dict: Request post fo
(
self,
method,
url,
header_params=None,
body=None,
post_params=None,
_request_timeout=None
)
| 252 | |
| 253 | |
| 254 | async def call_api( |
| 255 | self, |
| 256 | method, |
| 257 | url, |
| 258 | header_params=None, |
| 259 | body=None, |
| 260 | post_params=None, |
| 261 | _request_timeout=None |
| 262 | ) -> rest.RESTResponse: |
| 263 | """Makes the HTTP request (synchronous) |
| 264 | :param method: Method to call. |
| 265 | :param url: Path to method endpoint. |
| 266 | :param header_params: Header parameters to be |
| 267 | placed in the request header. |
| 268 | :param body: Request body. |
| 269 | :param post_params dict: Request post form parameters, |
| 270 | for `application/x-www-form-urlencoded`, `multipart/form-data`. |
| 271 | :param _request_timeout: timeout setting for this request. |
| 272 | :return: RESTResponse |
| 273 | """ |
| 274 | |
| 275 | try: |
| 276 | # perform request and return response |
| 277 | response_data = await self.rest_client.request( |
| 278 | method, url, |
| 279 | headers=header_params, |
| 280 | body=body, post_params=post_params, |
| 281 | _request_timeout=_request_timeout |
| 282 | ) |
| 283 | |
| 284 | except ApiException as e: |
| 285 | raise e |
| 286 | |
| 287 | return response_data |
| 288 | |
| 289 | def response_deserialize( |
| 290 | self, |