(requests, endpoint=None, *, url=None, **kwargs)
return json_or_http_error(response)
Sends a GET request to an API endpoint or a URL and returns the
    response JSON.

    ``endpoint`` is a relative URL, e.g. 'Patient/'. ``url`` is an
    absolute URL, e.g. 'https://example.com/fhir/Patient/'
Sends a GET request to an API endpoint or a URL and returns the
    response JSON.
Sends a GET request to an API endpoint or a URL and returns the response JSON .
def get_bundle(requests, endpoint=None, *, url=None, **kwargs) -> dict:
    """
    Sends a GET request to an API endpoint or a URL and returns the
    response JSON.

    ``endpoint`` is a relative URL, e.g. 'Patient/'. ``url`` is an
    absolute URL, e.g. 'https://example.com/fhir/Patient/'

    """
    assert endpoint or url, 'No API endpoint or URL given'
    if endpoint:
        response = requests.get(endpoint, **kwargs)
    else:
        # Use requests.send_request() so that `url` is not appended to
        # `requests.base_url`
        response = requests.send_request('GET', url, **kwargs)
    return json_or_http_error(response)
def get_bundle ( requests , endpoint = None , * , url = None , * * kwargs ) -> dict : assert endpoint or url , 'No API endpoint or URL given' if endpoint : response = requests . get ( endpoint , * * kwargs ) else : # Use requests.send_request() so that `url` is not appended to # `requests.base_url` response = requests . send_request ( 'GET' , url , * * kwargs ) return json_or_http_error ( response )