Wednesday, December 10, 2014

PHP JSON POST data stream 받기

http://stackoverflow.com/questions/4369759/how-to-recieve-post-data-sent-using-application-octet-stream-in-php

같이 일하는 회사에서 JSON 포맷을 data stream 형태로 POST 방식으로 보내준다고 하였다. 그런데 PHP를 한지 하도 오래되어서 몰랐는데 이런 것이 있었다. 정식 명칭은 application/octet-stream이다.

$rawPost = file_get_contents('php://input');

No comments:

Post a Comment