code: def make_request(endpoint, **kwargs):
          
          data = kwargs.get('json', [])
          package = kwargs.get('package', None)
          method = kwargs.get('method', 'GET')
  
          function = getattr(requests, method.lower())
  
          try:
              if package:
                  response = function(endpoint, data=data,
                                      files={'file': package})
              else:
                  response = function(endpoint, json=data)
          except requests.exceptions.ConnectionError:
              LOG.error("Couldn't connect to NApps server %s.", endpoint)
              sys.exit(1)
  
          return response
docs: Send a request to server.