Sham has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I wanted to communicat with server with SSL connection. by 1 Http::request with post Method or 2 Net::SSLeay with post_https. I want the fixed headers to sent compulsory. I want know whether both of these can be used for that???. 1.What are the prerequisites for both?. 2.which one to prffer? even smallest suggestions/advices are welcomed. Thanks, SHAM....
  • Comment on Differnce in Http::request with post Method and Net::SSLeay with post_https.

Replies are listed 'Best First'.
Re: Differnce in Http::request with post Method and Net::SSLeay with post_https.
by erroneousBollock (Curate) on Aug 28, 2007 at 03:03 UTC
    I guess what Anonymous Monk is saying is that you really don't need to use Net::SSLeay directly.

    An HTTP::Request object doesn't send itself, you send it with some other method from LWP::UserAgent or similar.

    Whether your URL is HTTP or HTTPS (SSL) is irrelevant; you're still using HTTP::Request. The LWP modules pick up on the 'https' in the URL and automagically wrap the connection up in an SSL "tunnel" ;)

    Of course, LWP can only do this if Crypt::SSLeay is correctly installed.

    As a side note, you can (as you probably are already aware) set any headers you wish in an HTTP::Request object.

    -David

Re: Differnce in Http::request with post Method and Net::SSLeay with post_https.
by SFLEX (Chaplain) on Aug 27, 2007 at 12:12 UTC
    I dont think you can use Http::request to connect to SSL.
    Besides Net::SSLeay is so easy to use and you can pick what SSL Version you need to use for the connection.