Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert curl_init() code to Java code

Status
Not open for further replies.

boske3

Programmer
Mar 11, 2006
20
RS
Hi everyone

I had PHP code but i need help how to convert it to Java code.
I search lots of examples but raerly on non of them has what i need.

So i need to convert this code to Java

$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_TIMEOUT => 30,
CURLOPT_CONNECTTIMEOUT => 25,
CURLOPT_USERAGENT => 'PP-TTT',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $soap_post,//contains some SOAP code
CURLOPT_HTTPHEADER => array('Content-Type: text/xml'),
CURLOPT_URL => $url , // contains some CURLOPT_SSLCERT => '/CURLOPT_SSLCERTPASSWD => 'pass123');

curl_setopt_array($ch , $options);
$answer = curl_exec($ch);

Any help will be appricate. Tnx
 
forum269 would be my suggestion.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Hi

Actually the OP posted it there first : thread269-1761873 .

As far as I know, cURL is not really popular among Java developers, so I would not expect much interest for the question in this format. :-(


Feherke.
feherke.ga
 
Actually the OP posted it there first

Okay, not in my list of forums that I visit here, so I had not seen that.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Hi

Thank you Feherke you are right not much people use this kind
of code in Java . I had found some examples on net but nothing much
complex that i need to use .

So if someone find or know about this it will be great help

tnx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top