#!/usr/bin/perl -w use warnings; use strict; use LWP::UserAgent; use URI; my $username="admin"; my $password="admin"; my $realm = "ty3.asia.dummy.com:8096"; my $url=qw(http://ty3.asia.dummy.com:8096/application); my $u = URI->new($url); my $host = $u->host; my $port = $u->port; my $hostport = "$host:$port"; my $ua = LWP::UserAgent->new(keep_alive => 1); $ua->credentials($hostport,$realm,$username,$password); my $response = $ua->get($url); my $content = $response->content; print "$content";