Hi folks, Im running an apache/mod_perl server and hope this isn't too far off base. I'm trying to get the following script to run against an e-merchant system. I've narrowed it down to the "content_type" and am struggling on how to send form data via LWP::UserAgent.
I beleive all I need is to disable the $r->content_type('application/x-www-form-urlencoded'), but dont quite understand how to do that. How many different content types are there and is it possible to use the LWP object and somehow disable it? ############ use strict; use LWP::UserAgent; my $ua = new LWP::UserAgent; $ua->agent("AgentName/0.1 " . $ua->agent); # Create a request my $req = new HTTP::Request POST => $post; $req->content_type('application/x-www-form-urlencoded'); $req->content("field1=$val1&field2=$val2"); # Pass request to the user agent and get a response back my $res = $ua->request($req); my $response = $res->content; print "response:$response:\n"; ############# Kirk