How do I extract the response body from an httpx GET request? or What's the best way to access the ht

22 Replies, 2225 Views

lol yeah `.body` doesn’t exist in httpx, my dude. You want `.text` for strings or `.content` for bytes.

If the site returns JSON, just do `response.json()` and it’ll parse it for you.

Also, pro tip: always check `response.status_code` first to make sure the request even worked.

Messages In This Thread



Users browsing this thread: 1 Guest(s)