How to send HTTP post request using spring
spring
Solution
If you are using Spring 3.0+, it will be better to use `RestTemplate` for sending HTTP requests. Once you wire the RestTemplate (API), you can use different methods in it to send different types of HTTP requests.
Problem
What configuration do i need to send HTTP post request through spring. I am using java application , it's not a web project. Can i use spring to send HTTP post request? I google it but most almost all examples are using spring MVC. Can i use just spring to send HTTP post request ? I found this bean on net but I don't know what to do after it. I am using spring3.2 and this post i think is of year 2008... ``` <bean id="httpClient" class="org.springbyexample.httpclient.HttpClientTemplate"> <property name="defaultUri"> <value><![CDATA[http://localhost:8093/test]]></value> </property> </bean> ``` Any suggestions?