For context, here is why it works and how it is different from from Post, Get and Request (mainly Post):
The PHP superglobal $_POST, is only supposed to wrap data that is either
This is because these are the only content types that must be supported by user agents.
By contrast, file_get_contents('php://input'); will get all the raw data from the request regardless of its type and is left for you to interpret/parse as you will.
Source with more detials: stackoverflow.com/a/8893792
Yes. I basically used this to get JSON String.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.