How to catch payload in php?
Closed this issue · 4 comments
navjot789 commented
I found out that the {payload: value} is not getting into the php file. can you give an example of how to catch POST value into the server via EventSource?
mpetazzoni commented
I'm not sure I understand what you're trying to accomplish. Can you describe your situation and problem some more?
navjot789 commented
var source = new SSE(url, {headers: {'Content-Type': 'text/plain'},
payload: 'Hello, world!',
method: 'GET'});
I just want to say that the value of the payload which is the "Hello World" is not transferring to another page(php). How would to achieve this? already used the var_dump($_GET).
wmertens commented
@navjot789 so you run that code in a browser, and you're connecting to a php server? You should debug the network in the browser to see what it sends
navjot789 commented
Yes, I m successfully connected to the server. Actually I am on localhost.