tags:

views:

80

answers:

2

I need to make some requests with cookies to an https:// URL. I know how to do it from the command line with cURL, and would like to automate it with Java.

I'm looking at HTTPClient and am getting utterly confused. It seems like it would take a lot of grungy programming. Is there any reason I should continue to pursue this line of effort?

The other way to go is to execute the cURL executable from within Java, that seems like it would be easier, if more of a pain.

+2  A: 
Thomas
It's probably better to point to HttpClient 4.x, as version 3 is no longer supported.
Bruno
+1 for the reasoning re: parsing error messages.
Jason S
A: 

Try Jetty + SSL

Not exactly straight-forward but well-documented and it works.

Chris
Jetty is a server, and from what I can tell, that's just a guide on setting up SSL, whereas the question is "what is the best way to make a request to an `https://` url?"
Thomas
Jetty has a HTTPClient implementation that does SSL -- http://docs.codehaus.org/display/JETTY/Jetty+HTTP+Client
Chris
Ah, I didn't see that in the linked article.
Thomas