How do you make an HTTP Request from a spring application to a non-spring application?
-
I am working on a spring application which has to make a HTTP call to another application(not running on Spring). 1) Make a HTTP request (say http://www.mysite.com) with required parameters 2) Get the response of the request and process the same. I cannot use Spring's HTTP Invokers as the other applicationĀ is not running on spring.... What are the other options to invoke a HTTP request call using spring framework?
-
Answer:
The answer for this is the same as if you weren't using Spring - you can use http://java.net.HttpURLConnection, or another http client class such as commons-httpclient (http://hc.apache.org/httpcomponents-client-ga/), which is pretty simple to use. If the other application has a REST-like interface, you can use Spring's RestTemplate.
Matt Brown at Quora Visit the source
Related Q & A:
- How can you view an HTTP request in transit?Best solution by Information Security
- How can I send an http request at a specific time?Best solution by Stack Overflow
- How can I make a myspace comment into a picture caption?Best solution by Yahoo! Answers
- How can I make a phone call to a cruise ship?Best solution by traveltips.usatoday.com
- How do you make a video clip into a picture?Best solution by answers.microsoft.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.