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

readAll returning empty object #7

Open
kzlar opened this issue Aug 8, 2024 · 0 comments
Open

readAll returning empty object #7

kzlar opened this issue Aug 8, 2024 · 0 comments

Comments

@kzlar
Copy link

kzlar commented Aug 8, 2024

Hey,

I'm not sure if this is a recent change by Apple but readAll stopped working for me. I'm getting an empty object {} for API calls that used to work.
Upon debugging, it seems like the isJson check is failing, what I ended up doing is locally patching the following line

        const isJson = (contentType === 'application/json' || contentType === 'application/vnd.api+json');

to

        const isJson = (contentType === 'application/json' || contentType === 'application/json;' || contentType === 'application/vnd.api+json');

and everything is working again.

ty for this library btw, really useful ;)

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