curl returns empty output when json-rpc
If you're on Amazon AWS try this:

setsebool -P httpd_can_network_connect 1


I had the same problem and it took me hours to figure out that the server was blocking connections. I thought it wasn't the problem because my AWS security group allowed it. But apparently the server was blocking it directly.