This happen when trying to hit the server URL for post from Electron application using XHR.
This is very strange although the GET request to the same is working.
So basically, below is the data from the app when using Electron and React-native as printed in the local node js server.
There is no much difference essentially.
From Electron App
------WebKitFormBoundaryuB0JC0S5inEZ8N9q
Content-Disposition: form-data; name="jsonData"
{"id":"","activeDuringCallHold":true,"activeDuringCallPark":true,"messageSourceSelection":"SYSTEM","audioFileDescription":null}
------WebKitFormBoundaryuB0JC0S5inEZ8N9q--
From React-Native app
POST
--AtDN_wHVWYYY2U3o1qKMCiQ.jaTz2HCZ7tPArc_Iumu.6tU3-40e5n3KyyFK2-lW--VmQn
content-disposition: form-data; name="jsonData"
{"id":"","activeDuringCallHold":true,"activeDuringCallPark":true,"messageSourceSelection":"SYSTEM","audioFileDescription":null}
--AtDN_wHVWYYY2U3o1qKMCiQ.jaTz2HCZ7tPArc_Iumu.6tU3-40e5n3KyyFK2-lW--VmQn--
And the headers from the two platforms are like below. The main difference is Origin is set to file:// in Electron which is not able to be changed by setting the header options for some reason,
From Electron App
Headers
{"host":"127.0.0.1:3000","connection":"keep-alive","content-length":"266","authorization":"Basic bWNkLWFkbWluOkFkbWluMUAxMjM=","origin":"file://","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Electron/3.0.10 Safari/537.36","content-type":"multipart/form-data;","accept":"*/*","accept-encoding":"gzip, deflate","accept-language":"en-GB"}
------WebKitFormBoundaryuB0JC0S5inEZ8N9q
Content-Disposition: form-data; name="jsonData"
{"id":"","activeDuringCallHold":true,"activeDuringCallPark":true,"messageSourceSelection":"SYSTEM","audioFileDescription":null}
------WebKitFormBoundaryuB0JC0S5inEZ8N9q--
From React-Native app
Headers
{"host":"127.0.0.1:3000","content-type":"multipart/form-data; boundary=h3KnK7XfLMut.istQrUWQ7W7Ucw0uVer8cyQVaeOamrAHWqNVdVEf4-7ZEAesw.Nl8HRNm","user-agent":"BroadcloudBulkProvisioning/2 CFNetwork/975.0.3 Darwin/17.7.0","connection":"keep-alive","accept":"*/*","accept-language":"en-us","content-length":"330","accept-encoding":"gzip, deflate","authorization":"Basic bWNkLWFkbWluOkFkbWluMUAxMjM="}
POST
--AtDN_wHVWYYY2U3o1qKMCiQ.jaTz2HCZ7tPArc_Iumu.6tU3-40e5n3KyyFK2-lW--VmQn
content-disposition: form-data; name="jsonData"
{"id":"","activeDuringCallHold":true,"activeDuringCallPark":true,"messageSourceSelection":"SYSTEM","audioFileDescription":null}
--AtDN_wHVWYYY2U3o1qKMCiQ.jaTz2HCZ7tPArc_Iumu.6tU3-40e5n3KyyFK2-lW--VmQn--
References:
https://support.mozilla.org/en-US/questions/1197304
https://support.mozilla.org/en-US/questions/1233607