Dear Perlmonks,
i have a simple http client that sends a few parameters to an http server. for port 80 it works fine.the server is on 8081 and when changing the port on client it doesnt pass the GET parameters. Am i putting the port in the wrong place?
use LWP;
$ua = LWP::UserAgent->new;
$ua->agent("camlet/ 0.1");
# Create a request
my $req = HTTP::Request->new(GET => 'http://server1:8081');
$req->content_type('application/x-www-form-urlencoded');
$req->content('request=event&source=camlet_cli&status=open&collection=camlet&time=12:00&severity=1&authorizationid=
=test&description=test&datacenter=cam&ip=192.168.0.4&camlettype=camagent&type=GET');
my $res = $ua->request($req);
Wed Jun 04 23:07:01 EDT 2008 INFO {content-type=application/x-www-form-urlencoded, connection=TE, close, type=GET, host=75.101.157.65:4320, content-length=224, user-agent=camlet/0.1, te=deflate,gzip;q=0.3}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.