Created
October 18, 2015 12:19
-
-
Save liorkesos/301ab0feacc2a4270d61 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function publishEvent($data) { | |
$opts = array( | |
'http' => array( | |
'method' => 'POST', | |
'header' => "Content-type: application/json", | |
'content' => json_encode($data) | |
) | |
); | |
$context = stream_context_create($opts); | |
$response = file_get_contents(self::INDEX_ENDPOINT_01.'/'.$data['index'].'/'.$data['eType'], false, $context); | |
... | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment