Z
Z
Zakharov Alexander2017-04-19 21:34:27
PHP
Zakharov Alexander, 2017-04-19 21:34:27

[Solved] Extract the text next to the return code from HTTP-response?

Hello.
This is not the first time I have observed such a picture when receiving resonse from different resources: Not that it is very necessary, but I would like to know how to extract it for enlightenment? In the picture, the message is duplicated in the request body, but this is not always the case. PS I would also like to know - is it not written in some HTTP standard what exactly can be returned in the very first line along with the return code? UPDATE: solution: You need to use the CURLOPT_HEADERFUNCTION setting and in it the first call is made with the first line of the answer, where Reason-Phrase is located: Just in case (thanks Artyom Petrenkov ): https://www.ietf.org/rfc/rfc2616. txt
01baf8e0977b4ce590bfd3002d9723aa.png

d68c7639e13e4b6bb64840f34c6c35f5.png
77d477d616b848ff84912020767fbbb3.png
and a link to the parser option for reason-phrase: https://gist.github.com/christeredvartsen/6620626

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question