Been struggling for days with this.
In my ionic (React) app. I have tried several different fetch attempts, but none of them return anything in the JSON response. I either get null or an empty response.
I’ve tried with Multi-part
And I’ll tried with Application/json
Result is empty or null when using resp.json() or resp.text()
callServer("userInfo","","UserName")?.then((resp)=>{ return resp.json(); }) .then((json)=>{
I have allow access set on my php back script. If I dump the $_POST, i just get Array(0).
In general, I know fetch is working. If I use GET or POST and don’t pass in form data, it works. The php is being used live for an app built with cordova and access using $.ajax so I know the php script works. I am just lost/confused why fetch is having such problems.