Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: AnyEvent::HTTP not sending ContentLength ?

by bart (Canon)
on Mar 21, 2016 at 08:13 UTC ( [id://1158417] : note . print w/replies, xml ) Need Help??


in reply to AnyEvent::HTTP not sending ContentLength ?

%headerArray, as you use it, is a flat list. What you want to pass is a hash reference, thus:
http_request "PUT" => $url, headers=>\%headerArray, body=>$content, sub {do stuff here};
Note the backslash before the percent sign.