def _make_api_call(self, http_type, endpoint, extra_headers = None, data=None):<EOL>
headers = {"<STR_LIT>": "<STR_LIT>" + self.account.access_token, "<STR_LIT:Content-Type>": "<STR_LIT:application/json>"}<EOL>if extra_headers is not None:<EOL><INDENT>headers.update(extra_headers)<EOL><DEDENT>log.debug('<STR_LIT>'<EOL>.format(self.message_id, headers, data))<EOL>if http_type == '<STR_LIT>':<EOL><INDENT>r = requests.post(endpoint, headers=headers, data=data)<EOL><DEDENT>elif http_type == '<STR_LIT>':<EOL><INDENT>r = requests.delete(endpoint, headers=headers)<EOL><DEDENT>elif http_type == '<STR_LIT>':<EOL><INDENT>r = requests.patch(endpoint, headers=headers, data=data)<EOL><DEDENT>else:<EOL><INDENT>raise NotImplemented<EOL><DEDENT>check_response(r)<EOL>
Internal method to handle making calls to the Outlook API and logging both the request and response
Args:
    http_type: (str) 'post' or 'delete'
    endpoint: (str) The endpoint the request will be made to
    headers: A dict of headers to send to the requests module in addition to Authorization and Content-Type
    data: The data to provide to the requests module

Raises:
    MiscError: For errors that aren't a 401
    AuthError: For 401 errors