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.
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