Answer the question
In order to leave comments, you need to log in
Sending data via Request Payload with PHP?
Studied one site. And I noticed that the form is sent there not via POST. And through Request Payload (name from google chrome).
Everything looks like this.
------WebKitFormBoundaryoZrtKjxEHMWPGSi4
Content-Disposition: form-data; name="data[name]"
myname
------WebKitFormBoundaryoZrtKjxEHMWPGSi4--
I found out that the angular js framework uses such data transfer.
I also learned that with РHP this transmission is taken in this way. file_get_contents('php://input')
But I'm interested in how I can transfer this data from PHP.
Right now I'm trying to use the Zend_Http_Client library to send requests to the server.
I assume that you need to use the setRawData method. More or less like this
$client->setRawData('json string', 'application/json');
But in what format to transfer information to it, I do not know. Also not sure if that's what you need.
Any information that will allow me to get off the ground will do. Thank you for your attention.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question