We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2004a83 commit b4bd57dCopy full SHA for b4bd57d
1 file changed
wfdb/io/download.py
@@ -131,13 +131,12 @@ def _stream_header(file_name, pn_dir):
131
"""
132
# Full url of header location
133
url = posixpath.join(config.db_index_url, pn_dir, file_name)
134
- response = requests.get(url)
135
136
- # Raise HTTPError if invalid url
137
- response.raise_for_status()
+ # Get the content of the remote file
+ content = _get_url(url)
138
139
# Get each line as a string
140
- filelines = response.content.decode('iso-8859-1').splitlines()
+ filelines = content.decode('iso-8859-1').splitlines()
141
142
# Separate content into header and comment lines
143
header_lines = []
0 commit comments