Skip to content

Commit 3f96346

Browse files
authored
Update utils.py
1 parent b80290a commit 3f96346

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

datacommons/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@ def set_api_key(api_key):
8080

8181

8282
def _send_request(req_url, req_json={}, compress=False, post=True):
83-
""" Sends a POST request to the given req_url with the given req_json.
83+
""" Sends a POST/GET request to req_url with req_json, default to POST.
8484
8585
Returns:
86-
The payload returned by sending the POST request formatted as a Python
87-
dict.
86+
The payload returned by sending the POST/GET request formatted as a dict.
8887
"""
8988
# Get the API key
9089
if not os.environ.get(_ENV_VAR_API_KEY, None):
@@ -139,4 +138,4 @@ def _format_expand_payload(payload, new_key, must_exist=[]):
139138
# Ensure all dcids in must_exist have some entry in results.
140139
for dcid in must_exist:
141140
results[dcid]
142-
return {k: sorted(list(v)) for k, v in results.items()}
141+
return {k: sorted(list(v)) for k, v in results.items()}

0 commit comments

Comments
 (0)