{
"args": {},
"headers": {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "en-US,en;q=0.5",
"Host": "httpbin.org",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0"
},
"origin": "89.208.116.150",
"url": "http://httpbin.org/get"
}
var_dump($response)
, выводится нормально <script>
var xhr = new XMLHttpRequest();
xhr.open("POST", '/test', true);
xhr.setRequestHeader('apikey', '123456');
xhr.send();
</script>