Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-??-bug] Content encoding does not follow HTTP specifications #11

Open
brianddk opened this issue Apr 2, 2024 · 0 comments
Open

Comments

@brianddk
Copy link
Owner

brianddk commented Apr 2, 2024

The content decoder in Requests is failing since the content encoding appears off. The added gaurd-code should not be required.

pyexch/pyexch/exchange.py

Lines 426 to 440 in 4c89a1e

if type(data) is dict:
return data
if type(data) is Response:
if type(data.content) is str:
data = data.content
else:
try:
return data.json()
except Exception: # as e:
return dict()
if type(data) is str:
try:
return loads(data)
except Exception: # as e:
return dict()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant