Answer the question
In order to leave comments, you need to log in
What is the advantage of BODY POST technology as opposed to regular POST?
Our android developer says it would be more convenient for him to send POST requests as a BODY, and not as a variable - a key.
I receive a request in the form: file_get_contents('php://input');
But I get raw data and I myself have to parse the string to the key value.
When I receive data via POST in the usual way, I receive data via the $_POST["key"] key and I don't worry.
There are already two questions:
1. What are the advantages of transferring data using the POST method via BODY? Does it make sense to bother? The Android developer says that it is easier for him to pass data this way than through the value-key
2. If you are already messing with this technology, are there any methods to parse the string into the value-key when such a large string comes in:
"json":{"data":" 12","
Thanks in advance to all who answer!
Answer the question
In order to leave comments, you need to log in
What does this mysterious abbreviation - BODY mean?
Just passing data in the body of the POST request in JSON format, instead of url encoded?
"What are the advantages of passing data by method"
JSON has the main advantage - for nested structures (or structures that are not yet nested, but in the process of finalizing the functionality can become such), in other cases it will slow down the work, since extra bytes in the request, + parsing.
"Are there any methods to parse a string into a key value" There are already
tools for parsing JSON for almost any programming language.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question