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
)
| 245 | |
| 246 | |
| 247 | def call_api( |
| 248 | self, |
| 249 | method, |
| 250 | url, |
| 251 | header_params=None, |
| 252 | body=None, |
| 253 | post_params=None, |
| 254 | _request_timeout=None |
| 255 | ) -> rest.RESTResponse: |
| 256 | """Makes the HTTP request (synchronous) |
| 257 | :param method: Method to call. |
| 258 | :param url: Path to method endpoint. |
| 259 | :param header_params: Header parameters to be |
| 260 | placed in the request header. |
| 261 | :param body: Request body. |
| 262 | :param post_params dict: Request post form parameters, |
| 263 | for `application/x-www-form-urlencoded`, `multipart/form-data`. |
| 264 | :param _request_timeout: timeout setting for this request. |
| 265 | :return: RESTResponse |
| 266 | """ |
| 267 | |
| 268 | try: |
| 269 | # perform request and return response |
| 270 | response_data = self.rest_client.request( |
| 271 | method, url, |
| 272 | headers=header_params, |
| 273 | body=body, post_params=post_params, |
| 274 | _request_timeout=_request_timeout |
| 275 | ) |
| 276 | |
| 277 | except ApiException as e: |
| 278 | raise e |
| 279 | |
| 280 | return response_data |
| 281 | |
| 282 | def response_deserialize( |
| 283 | self, |
no test coverage detected