We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14f61cd commit fb797f9Copy full SHA for fb797f9
functions-python/helpers/utils.py
@@ -107,8 +107,11 @@ def download_and_get_hash(
107
"AppleWebKit/537.36 (KHTML, like Gecko) "
108
"Chrome/126.0.0.0 Mobile Safari/537.36"
109
}
110
+ # Careful, some URLs may already contain a query string
111
+ # (e.g. http://api.511.org/transit/datafeeds?operator_id=CE)
112
if authentication_type == 1 and api_key_parameter_name and credentials:
- url += f"?{api_key_parameter_name}={credentials}"
113
+ separator = "&" if "?" in url else "?"
114
+ url += f"{separator}{api_key_parameter_name}={credentials}"
115
116
# authentication_type == 2 -> the credentials are passed in the header
117
if authentication_type == 2 and api_key_parameter_name and credentials:
0 commit comments