> perl -MLWP::UserAgent -e "$ua=LWP::UserAgent->new();$ua->default_header('Content-type' => 'application/json;odata=verbose'); $ua->add_handler('request_send',sub{shift->dump;return}); $ua->post('http://localhost:1234',{foo => bar})" POST http://localhost:1234 User-Agent: libwww-perl/6.04 Content-Length: 7 Content-Type: application/x-www-form-urlencoded foo=bar #### >perl -MLWP::UserAgent -MHTTP::Request::Common -e "$ua=LWP::UserAgent->new(); req= POST 'http://localhost:1234', 'Content-type' => 'application/json;odata=verbose', Content => { foo => 'bar' }; $ua->add_handler('request_send',sub{shift->dump;return}); $ua->request($req)" POST http://localhost:1234 User-Agent: libwww-perl/6.04 Content-Length: 7 Content-Type: application/json;odata=verbose foo=bar