MCPcopy Index your code
hub / github.com/kubernetes-client/python / call_api

Method call_api

kubernetes/aio/client/api_client.py:329–396  ·  view source on GitHub ↗

Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. :param path_params: Path parameters in the url. :para

(self, resource_path, method,
                 path_params=None, query_params=None, header_params=None,
                 body=None, post_params=None, files=None,
                 response_types_map=None, auth_settings=None,
                 async_req=None, _return_http_data_only=None,
                 collection_formats=None,_preload_content=True,
                  _request_timeout=None, _host=None, _request_auth=None)

Source from the content-addressed store, hash-verified

327 return self.__deserialize_model(data, klass)
328
329 def call_api(self, resource_path, method,
330 path_params=None, query_params=None, header_params=None,
331 body=None, post_params=None, files=None,
332 response_types_map=None, auth_settings=None,
333 async_req=None, _return_http_data_only=None,
334 collection_formats=None,_preload_content=True,
335 _request_timeout=None, _host=None, _request_auth=None):
336 """Makes the HTTP request (synchronous) and returns deserialized data.
337
338 To make an async_req request, set the async_req parameter.
339
340 :param resource_path: Path to method endpoint.
341 :param method: Method to call.
342 :param path_params: Path parameters in the url.
343 :param query_params: Query parameters in the url.
344 :param header_params: Header parameters to be
345 placed in the request header.
346 :param body: Request body.
347 :param post_params dict: Request post form parameters,
348 for `application/x-www-form-urlencoded`, `multipart/form-data`.
349 :param auth_settings list: Auth Settings names for the request.
350 :param response: Response data type.
351 :param files dict: key -> filename, value -> filepath,
352 for `multipart/form-data`.
353 :param async_req bool: execute request asynchronously
354 :param _return_http_data_only: response data without head status code
355 and headers
356 :param collection_formats: dict of collection formats for path, query,
357 header, and post parameters.
358 :param _preload_content: if False, the urllib3.HTTPResponse object will
359 be returned without reading/decoding response
360 data. Default is True.
361 :param _request_timeout: timeout setting for this request. If one
362 number provided, it will be total request
363 timeout. It can also be a pair (tuple) of
364 (connection, read) timeouts.
365 :param _request_auth: set to override the auth_settings for an a single
366 request; this effectively ignores the authentication
367 in the spec for a single request.
368 :type _request_token: dict, optional
369 :return:
370 If async_req parameter is True,
371 the request will be called asynchronously.
372 The method will return the request thread.
373 If parameter async_req is False or missing,
374 then the method will return the response directly.
375 """
376 if not async_req:
377 return self.__call_api(resource_path, method,
378 path_params, query_params, header_params,
379 body, post_params, files,
380 response_types_map, auth_settings,
381 _return_http_data_only, collection_formats,
382 _preload_content, _request_timeout, _host,
383 _request_auth)
384
385 return self.pool.apply_async(self.__call_api, (resource_path,
386 method, path_params,

Calls 1

__call_apiMethod · 0.95

Tested by

no test coverage detected