Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Posts
    2

    Unanswered: perl https request

    Friends
    Please help me in writing https connection to perl
    I need to access or hit https url every 10 minutes
    I am java developer
    i got some help on web
    but not complete
    here is my perl program.

    #!/usr/bin/perl
    use LWP::UserAgent;
    $ua = new LWP::UserAgent;
    $ua->agent("AgentName/0.1 " . $ua->agent);

    # Create a request
    my $req = new HTTPS::Request ('POST' , 'https://url.com:8090/file/request.jsp');
    $req->connection('keep-alive');
    $req->authorization_basic('test', 'test');
    $req->content_type('application/x-www-form-urlencoded');
    $req->content('');

    # Pass request to the user agent and get a response back
    my $res = $ua->request($req);

    # Check the outcome of the response
    if ($res->is_success) {
    print $res->content;
    } else {
    print "Bad luck this time\n";
    }


    and where will I get all perl module.

    thanks
    vinay

  2. #2
    Join Date
    Jun 2004
    Posts
    1

    modules:

    Hey there, I was just checking to see if you had at least found the modules? I need to track down the 'HTTP::Request' module.

    Cheers,

    Ben

  3. #3
    Join Date
    Jun 2004
    Location
    Nowhere Near You
    Posts
    89
    isn't HTTP part of LWP?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •