how to send http post create request using curl command

Java
curl --data "param1=value1" --data "param2=value2" https://example.com/resource.cgi
$ curl -X POST -d @filename http://locahost:8080/weather$ curl --form "[email protected]" http://locahost:8080/weather$ curl --data "param1=value1¶m2=value2" http://locahost:8080/weather
Source

Also in Java: