You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using http requests via patched by Capacitor's native-bridge XHR/Fetch with expected responseType, the Bridge doesn't pass responseType to Native HTTP (Android/iOS). This leads to Native HTTP to not process the data with expected response type.
Example:
A request with responseType: 'blob' will not be treated by native HTTP as Blob and encoded to base64 rather than a plain string, despite responseType to be expected in native bridges code on Android and iOS side.
Expected Behavior
Requests with responseType: 'blob' should return Blob with valid type.
Do you have a PR or commit to back up the statement? I don't see any commit regarding the topic with changes that fix this.
I tried to reproduce the issue on V6 in dummy project, but couldn't succeed because bridge doesn't forward the request to NativeHttp anymore (because of new implementation of isRelativeOrProxyUrl that intercepts that).
But the issue is definitely actual on my private project, it can be also easily visible by looking at codebase.
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
@capacitor/cli: 5.6.0
@capacitor/core: 5.6.0
@capacitor/android: 5.6.0
@capacitor/ios: 5.6.0
Other API Details
Platforms Affected
Current Behavior
When using http requests via patched by Capacitor's native-bridge XHR/Fetch with expected
responseType
, the Bridge doesn't passresponseType
to Native HTTP (Android/iOS). This leads to Native HTTP to not process the data with expected response type.Example:
A request with
responseType: 'blob'
will not be treated by native HTTP as Blob and encoded to base64 rather than a plain string, despiteresponseType
to be expected in native bridges code on Android and iOS side.Expected Behavior
Requests with
responseType: 'blob'
should return Blob with valid type.Project Reproduction
https://github.com/SillyButt/capacitor-response-type-bug-reproduction
Additional Information
A convenient visualization of the code flow
The text was updated successfully, but these errors were encountered: