Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
#http://validatie-api.hydamo.nl/task/[task_id]/result/metadata
result_folder = r"...\Resultaten"

response_get_metadata = requests.get(server + '/task/' + str(task_id) + '/result/metadata', headers=my_headers, verify=hydamo_cert)

if response_get_metadata.status_code == 200:
    result_data = bytes(response_get_metadata.content)
    if not os.path.exists(result_folder):
        os.makedirs(result_folder)
    open(os.path.join(result_folder,f"{task_id}\_metadata.json"), 'wb').write(response_get_metadata.content)

...