Hello:

I'm trying to submit a form with value "abc123?LIST, UID=efg, PWD=hijk~". This works fine when I submit via a browser. But when I try to send the same via the following code -
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
my $req=HTTP::Request->new(POST=>"https://xyz.com/servlet/post2jms";);
$req->content_type('application/x-www-form-urlencoded');
$req->content('abc123?LIST, UID=efg, PWD=hijk~');
$res = $ua->request($req,"some-result.txt" );
if ($res->is_success) {
print "ok\n";
print $res->as_string, "\n";
}
else {
print $res->as_string, "\n";
print $res->status_line, "\n";
}


- I get a "HTTP/1.1 500 (Internal Server Error) Server Error"

Can anyone help please?

-Pritesh


Reply via email to