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

deserialising JSON multiple times (no_verify switch for fetch?) #33

Open
clbarnes opened this issue Nov 8, 2018 · 1 comment
Open

Comments

@clbarnes
Copy link
Collaborator

clbarnes commented Nov 8, 2018

Currently, fetch deserialises the JSON to check for errors, even if the user wants the raw result. This could be a performance issue. Furthermore, the requests.Response object does not cache its .json() result, so when the user doesn't want the raw result, they deserialise the same (possibly large) JSON twice.

Should raw automatically apply no_verify? Is there even a need to have two separate switches?

@clbarnes clbarnes changed the title no_verify switch for fetch methods deserialising JSON multiple times (no_verify switch for fetch?) Nov 8, 2018
@clbarnes
Copy link
Collaborator Author

clbarnes commented Nov 8, 2018

Currently the content is deserialised twice in normal circumstances, three times on error.

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