mercredi 2 septembre 2015

AWS Elastic Beanstalk Worker Environment - HTTP POST Requests PHP

Any help will be appreciated. I have setup SQS on my application server to send messages to my queue. I'm able to send and get messages from my queue manually. Now I've spun up the EB Worker Environment to get these messages automatically. It sends them as HTTP POST Request. My question is how to I catch this messages. I'm using PHP. I have tried the below but no joy;

$entityBody = file_get_contents('php://input');
$entityBody = stream_get_contents(STDIN);

The end goal is to get the message, decode it and use it to send an email. FYI; I'm able to do this manually. Just need a way to automate the worker.

Thanks.




Aucun commentaire:

Enregistrer un commentaire