code: def get_options(server):
      
      try:
          response = requests.options(
              server, allow_redirects=False, verify=False, timeout=5)
      except (requests.exceptions.ConnectionError,
              requests.exceptions.MissingSchema):
          return "Server {} is not available!".format(server)
  
      try:
          return {'allowed': response.headers['Allow']}
      except KeyError:
          return "Unable to get HTTP methods"
docs: Retrieve the available HTTP verbs