capacitor icon indicating copy to clipboard operation
capacitor copied to clipboard

[Bug]: http request break on Android when sending formData

Open jongbonga opened this issue 1 year ago • 3 comments

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 6.1.1
  @capacitor/core: 6.1.1
  @capacitor/android: 6.1.1
  @capacitor/ios: 6.1.1

Installed Dependencies:

  @capacitor/cli: 6.1.1
  @capacitor/core: 6.1.1
  @capacitor/ios: 6.1.1
  @capacitor/android: 6.1.1

Other API Details

npm -v 10.7.0
node -v v18.20.4

Platforms Affected

  • [ ] iOS
  • [X] Android
  • [ ] Web

Current Behavior

on Capacitor 5 sending formData with CapacitorHttp enabled on config and content-type: 'multipart/form-data' hard-coded in the headers works fine, it fails on Capacitor 6

Expected Behavior

it should work with content-type: 'multipart/form-data' or documented somewhere

Project Reproduction

https://github.com/jongbonga/code-reproduction

Additional Information

There is a PR for the issue here

jongbonga avatar Jul 29 '24 15:07 jongbonga

This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.

ionitron-bot[bot] avatar Aug 27 '24 18:08 ionitron-bot[bot]

The same:

5.5.1 -> my express service got content type content-type’: ‘multipart/form-data as default 6.0.1 -> i got content-type': 'application/x-www-form-urlencoded without file in data

Any idea how can i fix this?

grzegorzCieslik95 avatar Aug 30 '24 12:08 grzegorzCieslik95

please, report a new issue, that seems like a different problem

jcesarmobile avatar Aug 30 '24 12:08 jcesarmobile