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

data type is already JSON #22

Open
gahyuun opened this issue Nov 8, 2024 · 0 comments · May be fixed by #23
Open

data type is already JSON #22

gahyuun opened this issue Nov 8, 2024 · 0 comments · May be fixed by #23
Assignees
Labels
bug Something isn't working

Comments

@gahyuun
Copy link
Member

gahyuun commented Nov 8, 2024

Environment

fetch-ax 1.0.10 version

Reproduction

Not a bug, but likely needs to be fixed

Describe the bug

when body type is JSON, typeof data === 'string' is true, but I think it would be better if there was explicit code to check if it's a JSON type.

  typeof data === 'string' ||
    data instanceof ReadableStream ||
    data instanceof Blob ||
    data instanceof ArrayBuffer ||
    data instanceof FormData ||
    data instanceof URLSearchParams ||
    isArrayBufferView(data)

Additional context

No response

Logs

No response

@gahyuun gahyuun added the bug Something isn't working label Nov 8, 2024
@gahyuun gahyuun self-assigned this Nov 8, 2024
@gahyuun gahyuun linked a pull request Nov 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant