-
Notifications
You must be signed in to change notification settings - Fork 996
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
[Bug]: Sending TypedArray as fetch body gets JSON.stringified #7473
Comments
please, provide a sample app that reproduces the issue, not a full app with no indications about how to run or reproduce |
This issue has been labeled as |
This comment was marked as off-topic.
This comment was marked as off-topic.
This is how it works from my understanding:
From this analysis, all platforms should be affected by this bug since the convertBody function is shared by ios, android and web.
In both cases, a new function is needed to write mixed data (string+integer) to the outputstream (like writeRequestBody does for string). Please correct me if I said something wrong. I hope this might help to solve this issue. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Capacitor Version
Latest Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0
Installed Dependencies:
@capacitor/cli: 5.7.5
@capacitor/core: 5.7.5
@capacitor/android: 5.7.5
@capacitor/ios: 5.5.1
[success] Android looking great! 👌
[error] Xcode is not installed
Other API Details
Platforms Affected
Current Behavior
sending a POST via fetch with a UInt8Array as body results in the TypedArray getting stringified as JSON.
callback: 40428488, pluginId: CapacitorHttp, methodName: request, methodData: {"url":"https://github.com/marcelklehr/test.git/git-upload-pack","method":"POST","data":{"0":48,"1":48,"2":56,"3":....
Expected Behavior
The binary data sould be sent unchanged.
Project Reproduction
https://github.com/floccusaddon/floccus
Additional Information
No response
The text was updated successfully, but these errors were encountered: