capacitor-community / http

Community plugin for native HTTP
MIT License
209 stars 136 forks source link

fix(ios): null in body or result #228

Open stonewoodman opened 2 years ago

stonewoodman commented 2 years ago

I'm having a problem with iOS if data is null. await Http.request({ 'POST', 'https://...', headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, data: null }); This throws an error. If result is JSON-null, then is thrown an error too. This PR fixes both bugs.