Can someone explain me why "curl: (7) Failed to connect to port 2000: Connection refused" ?

MarcoI nginx-forum at
Wed May 13 14:18:56 UTC 2020

I solved it .
It was mix of small little problems that together hindered the correct
- changed in golang webserver HOST =
- capitalized the first letter of each element of the Puser struct in order
to make it visible to json decoder
- used correctly the curl command:

curl -d'{"first_name":"pinco", "last_name":"pallo",
"company_name":"Company","email":"pinco.pallo at","tel":"111111111"}'
-H "Content-Type: application/json"
[{"First_name":"pinco","Last_name":"pallo","Country":"","Company_name":"Company","Email":"pinco.pallo at","Tel":"111111111"}]

Posted at Nginx Forum:,288019,288023#msg-288023

More information about the nginx mailing list