Answer the question
In order to leave comments, you need to log in
How to get the body of a POST request?
The client generates and sends a POST with the Content-Type: text/xml type, putting data into the xml body.
How to get only the request body? Those. only data. If I read php://input I get everything raw, including headers. It doesn't need me. Is there a variant?
Those. now in php://input
--dd20c743ed8243b8a574885ebe6df7a3
Content-Disposition: form-data; name="data"; filename="Файл обмена 1С-to-Сайт ТИП2.xml"
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<СommercialInformation>
<IDSession>
2390c14c-2fd7-4658-86be-a4a55d796b98
</IDSession>
<ExchangeType>
2
</ExchangeType>
<LastExchangeDate>
01.01.0001 00:00:00
</LastExchangeDate>
</СommercialInformation>
--dd20c743ed8243b8a574885ebe6df7a3--
<?xml version="1.0" encoding="UTF-8"?>
<СommercialInformation>
<IDSession>
2390c14c-2fd7-4658-86be-a4a55d796b98
</IDSession>
<ExchangeType>
2
</ExchangeType>
<LastExchangeDate>
01.01.0001 00:00:00
</LastExchangeDate>
</СommercialInformation>
Answer the question
In order to leave comments, you need to log in
You mean with headers?
The body of the POST request is exactly php://input
What you sent, you will receive here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question