parameters: (url: str, resource_type: str)
docstring: Downloads a resource of type resource_type from the specified url.
  
    Args:
      url: The URL of the resource.
      resource_type: The HTTP content-type of the resource.
  
    Returns:
      A tuple of (resource_type, bytes) on success (HTTP code 200), otherwise
      returns an empty string.
docstring_summary: Downloads a resource of type resource_type from the specified url.
docstring_tokens: Downloads a resource of type resource_type from the specified url .
function: def download(url: str, resource_type: str) -> Union[Tuple[str, bytes], str]:
    """Downloads a resource of type resource_type from the specified url.
  
    Args:
      url: The URL of the resource.
      resource_type: The HTTP content-type of the resource.
  
    Returns:
      A tuple of (resource_type, bytes) on success (HTTP code 200), otherwise
      returns an empty string.
    """
    headers = {"Accept": "application/fhir+json"}
    if FLAGS.epic_client_id:
      headers["Epic-Client-ID"] = FLAGS.epic_client_id
  
    if FLAGS.debug:
      print("GET %s" % url)
    r = requests.get(url, headers=headers)
    if r.status_code == 200:
      if FLAGS.debug:
        print("DONE %s" % url)
      return (resource_type, r.content)
    else:
      if FLAGS.debug:
        print("ERROR: ", r)
      return ""
function_tokens: def download ( url : str , resource_type : str ) -> Union [ Tuple [ str , bytes ] , str ] : headers = { "Accept" : "application/fhir+json" } if FLAGS . epic_client_id : headers [ "Epic-Client-ID" ] = FLAGS . epic_client_id if FLAGS . debug : print ( "GET %s" % url ) r = requests . get ( url , headers = headers ) if r . status_code == 200 : if FLAGS . debug : print ( "DONE %s" % url ) return ( resource_type , r . content ) else : if FLAGS . debug : print ( "ERROR: " , r ) return ""