I need to check if a file exists. My approach until now was doing it via Artifactory REST API
url = https://artifactory.io/path_to_file/file.jar
headers = {'X-JFrog-Art-Api': 'api_key'}
response = requests.get(url, headers=headers)
assert(200 == response.status_code)
assert(response.text != "")
but there's a file that it too big and it's taking too long to get the response.
Is there another way to check if this file exists?
As commented by Roland, I've just call requests.head
and it was enough