Skip to content

Commit

Permalink
Fix httpx support (#94)
Browse files Browse the repository at this point in the history
Closes #92
  • Loading branch information
brettcannon committed Jan 7, 2020
1 parent 65c7964 commit d8d2327
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gidgethub/httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Mapping, Tuple, Any

try:
from httpx import AsyncClient as Client # type: ignore
from httpx import AsyncClient as Client
except ImportError:
from httpx import Client

Expand All @@ -20,7 +20,7 @@ async def _request(self, method: str, url: str, headers: Mapping[str, str],
"""Make an HTTP request."""
response = await self._client.request(
method, url, headers=dict(headers), data=body)
return response.status_code, response.headers, await response.read()
return response.status_code, response.headers, response.content

async def sleep(self, seconds: float) -> None:
"""Sleep for the specified number of seconds."""
Expand Down

0 comments on commit d8d2327

Please sign in to comment.