Sending data to PHP server with Fetch API (POST method and JSON preferred)
问题 I'm trying Fetch API for the first time and I have problems sending POST data to a PHP server. I'm moving away from $.ajax and trying pure javascript solutions to communicate with different servers (sometimes local, sometimes not). Now I'm trying to understand Fetch API and, even if it's simple and intuitive, I've stumbled on a weird and unexpected problem: I CAN'T send JSON post to PHP server I CAN send form-data post to LOCAL PHP I CAN'T send form-data post to WEB URL PHP I can (obviously)