xxxxxxxxxx
my_dict = {"key": "value"} # Example dictionary
# Accessing a value using the 'get()' method on a dictionary
my_value = my_dict.get("key") # Using the 'get()' method to retrieve the value associated with the key "key"
print(my_value) # Output: "value"
xxxxxxxxxx
The problem is that for json.load you should pass a file like object with a read function defined.
So either you use json.load(response) or json.loads(response.read()).