So, I have this code:
axios({ method: 'post', url, headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, data: { json, type, } })
I initially had normal axios.post , but I changed to this because I thought it might be a header problem. However, I did not find anything in $_REQUEST and $_POST . However, it accepts data in file_get_contents("php://input") .
Any idea what is wrong?
Edit
OK, I think I know what happened. It sends it as a json object, so it can only be read in php: // input. How to change it to a regular line in axios?
source share