Response.json try to parse even empty body
#565
|
If response has r = await Client().get("...") # empty body
await r.json()Becomes this: Is it intentional? |
Replies: 2 comments 4 replies
|
This is the error thrown by the upstream library, and it should behave in a consistent manner with reqwest. https://github.com/seanmonstar/reqwest/blob/1f72916f5cdc30f6cb6c63038c89063795294d50/src/async_impl/response.rs#L270 Give me an example that can be replicated. Maybe there is room for optimization in that case. |
|
Hey everyone! I just created a high-speed asynchronous compute core in C++ and Python. Check it out, running tests now! The GitHub view counter is live: https://github.com/nlozkina19-crypto/vector-zero-compute |
It seems that only aiohttp likes to return None when parsing an empty body results in an error.