Skip to content

Commit

Permalink
Fix File.download_data()
Browse files Browse the repository at this point in the history
Fix File.download_data() broken in a previous commit (which switched it
to use the internal Ryver session instead, which sends an auth header,
causing a 400).
  • Loading branch information
tylertian123 committed Nov 2, 2020
1 parent 11ca311 commit 0e33571
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyryver/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -3129,7 +3129,8 @@ async def download_data(self) -> bytes:
:return: The downloaded file data, as raw bytes.
"""
async with self._ryver._session.get(self.get_url()) as resp:
# Same as above, this seems to be the only way to send the request without the auth header
async with aiohttp.request("GET", self.get_url()) as resp:
resp.raise_for_status()
return await resp.content.read()

Expand Down

0 comments on commit 0e33571

Please sign in to comment.