Thanks for posting the working version. I haven't worked with HTTP::request / HTTP::retry before, so I was unsure about whether the payload, if present, would be captured using HTTP::request. After some testing, it looks like it isn't and can't be.
The HTTP::request command is only available in the HTTP_REQUEST event. That event is triggered when the headers have been parsed--the data if present hasn't been parsed yet. So I think your method of collecting the payload is the best way to handle this.
This would be good to confirm and clarify in the HTTP::request wiki page.
Aaron