HTTP::Request->new expects it's second argument to be an URL, and so is probably escaping your string in an attempt to Do The Right Thing(tm).
Instead, you want to use the optional third (headers) and fourth (content) arguments...
my $req = HTTP::Request->new(
'POST',
'https://asite.com:443/sub/create_user.cgi',
HTTP::Headers->new(
Content_Type => 'application/x-www-form-urlencoded',
Content_Length => 33,
),
'<userCreate>John.Doe</userCreate>',
);
Although I personally find the shortcut functions in HTTP::Request::Common a lot more readable...
my $req = POST
'https://asite.com:443/sub/create_user.cgi',
Content => '<userCreate>John.Doe</userCreate>',
);
--k.
| [reply] [d/l] [select] |