Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: AnyEvent::HTTP not sending ContentLength ?

by 1nickt (Abbot)
on Mar 20, 2016 at 19:29 UTC ( #1158374=note: print w/replies, xml ) Need Help??


in reply to AnyEvent::HTTP not sending ContentLength ?

The docs for AnyEvent::HTTP (which I haven't used) show the headers being passed in to http_request() as a reference to a hash, not the hash itself. Try:

my $headers = { Content-Length => 2345, }; http_request 'PUT' => $url, 'headers' => $headers, ...

I can't see a simple way to turn on tracing in AnyEvent::HTTP either, which isn't helping my debugging.

Maybe setting $ENV{ PERL_ANYEVENT_VERBOSE } see http://search.cpan.org/~mlehmann/AnyEvent-7.12/lib/AnyEvent.pm#ENVIRONMENT_VARIABLES


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: AnyEvent::HTTP not sending ContentLength ?
by ForeverLearning (Novice) on Mar 20, 2016 at 19:32 UTC
    my $headers={} did the trick. Thanks ! Also thanks to the debug pointer.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1158374]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-01-17 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (51 votes). Check out past polls.

    Notices?