Answer the question
In order to leave comments, you need to log in
In what format should data be transmitted via api?
I am making an API for a site in PHP, where you need to transfer data not only key-value, but also data arrays.
For example, I got the following request:
http://www.site.ru/api?token=32b4cecdadfe9052f9f1248d26bc4d19&method=contact_add&name=Максим&surname=Петров&property[skype]=petrovm&property[phone][]=79851234567&property[phone][]=79855554477
http://www.site.ru/api?token=32b4cecdadfe9052f9f1248d26bc4d19&method=contact_add&data={name:"Максим", surname:"Петров",property:{skype:"petrovm", phone:["79851234567", "79855554477"]}}
Answer the question
In order to leave comments, you need to log in
Nite, not right. If you add a user with this command, then accept it using the POST method. But send the request body in JSON.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question