in reply to Re: http postin thread http post
its the same when i try the same example i get the same error 411 Length Required
Forgive my scepticism but I rather suppose that isn't the case. Here's the SSCCE you should have supplied. It gives a 301.
#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $rep = HTTP::Request->new (POST => "http://api.website.com/api/v1/s +ms/send/"); $rep->content_type ("application/json"); $rep->content ('{ "foo": "bar" }'); my $res = $ua->request($rep); print 'Response code: ' . $res->code . "\n"; [download]