in reply to Re^2: AnyEvent::HTTP and getting data back from a post request
in thread AnyEvent::HTTP and getting data back from a post request
my $myReturn; http_post( http://${username}:${password}\@${host}${collection}", $archive, headers => \%headers, sub { my ($body, $header) = @_; print "web response: ".Dumper([$body, $header]); $myReturn = $body; } );
I have confirmed that the length of the body ($archive) is the same as the size of the file on disk, so that's being loaded... I'm just not apparently getting any content back from the http_post - I'm not seeing the print statement in the anonymous call-back routine, which indicates I'm still not grasping the way the calls, and the call-backs, work.
I think that the http_* methods work by making a call to the defined URL, and then process - upon completion of the http request sequence - the block that is the anonymous subroutine.... is that right?
Does the original code have the requisite loop or holding stuff to wait until all the http calls have been made, and responded? (I think this may actually be my problem.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: AnyEvent::HTTP and getting data back from a post request
by Corion (Patriarch) on Jan 27, 2011 at 15:31 UTC | |
|
Re^4: AnyEvent::HTTP and getting data back from a post request
by Anonymous Monk on Jan 27, 2011 at 15:42 UTC | |
by kiz (Monk) on Jan 27, 2011 at 16:13 UTC |