Removing url encoding from XML POST requests


E

Eric

Hi,

I was sure I would be able to find some info about this in the LWP
archives but I have had no luck. I also can't seem to tell if the
libwwww Perl mailing list is alive or not.


my $ua = LWP::UserAgent->new();
push @{ $ua->requests_redirectable }, 'POST';

my $utf_account_header = encode("utf8", $account_header);
my $req = POST $self->{posturl},[$utf_account_header];
$req->header('Content-Type' => 'text/xml; charset=UTF-8');
my $res = $ua->request($req);


I am not sure if the utf encoding is nessicary, but from what I read in
the HTTP::Request manpage it is. "Note that the content should be a
string of bytes. Strings in perl
can contain characters outside the range of a byte. The Encode
module can be used to turn such strings into a string of bytes."


But where I want to send,
<PAYZIP_XML>
<REQUEST>

I get

User-Agent: libwww-perl/5.79
Content-Length: 728
Content-Type: text/xml; charset=UTF-8

%3CPAYZIP_XML%3E%0A++%3CREQUEST%3E%0A++++
(I cut out some bad to post info)



I know for certain the server does not expect to get url encoding, I
don't know why the hell they could not have just decided to check for it
though! :) I tested that using the POST script and was able to get a
correct response with it.

So can someone tell me how to specify that I am sending the exact
content I want to send and not to encode it?


Thanks,

Eric
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top