INNER CODE UNIT · Python

ApiCall

GoogleCloudPlatform/bank-of-anthos · src/frontend/api_call.py:31

class ApiCall:
    """Class for initializing and making an API call"""

    def __init__(self, display_name, api_request, logger):
        """Initialize an API call"""
        self.display_name = display_name
        self.api_request = api_request
        self.logger = logger

    def make_call(self):
        """Making an API call"""
        response = None

        try:
            response = get(url=self.api_request.url,
                           headers=self.api_request.headers,
                           timeout=self.api_request.timeout)
        except (RequestException, ValueError) as err:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…