I'm no expert and have never done anything like this, but from having read the AnyEvent::HTTP documentation, i guess it might do what you want. Check the on_body argument or http_request(). And check AnyEvent::Handle, which allows you to specify read_size and max_read_size.
Would that do what you want? On 17 January 2013 05:44, Bill Moseley <mose...@hank.org> wrote: > I need to do some upload testing where I can control the chunk size and > rate of an upload. So, what I'd like is to use a sub ref that is called > for each chunk that is uploaded. > > I'm not very clear from the docs in HTTP::Request::Common if > $DYNAMIC_FILE_UPLOAD > can be used for that -- doesn't seem so. That seems more for seeing how > much data has been uploaded from a file (e.g. a progress meter). > > Is there a way to chunk upload a form-data request from a sub ref using > LWP? Somewhat of the opposite of the content_cb for a response. > > Thanks, > > > -- > Bill Moseley > mose...@hank.org >