1

I'm creating a web hook to receive a JSON POST from the tool Looker (http://looker.com). My problem is that I receive no data although I know for sure that Looker sends data (has been tested with https://requestb.in). The data is sent as an attached JSON payload.

My PHP code is this:

<?php
setlocale(LC_ALL,'da_DK.UTF8');
header("Content-Type: application/json; charset=utf-8");
require("functions.php"); //a file containing some functions
$json = file_get_contents('php://input'); 
jsonLog($json); //a small function that writes the content to a file (for testing)
?>

When testing my web hook through postman, everything works fine.

Can anyone spot an error in my PHP code? Is it a header thing?

Thanks in advance!

EchoGecko
  • 13
  • 4

0 Answers0