in reply to Re^2: Rest API listener (simple)
in thread Rest API listener (simple)

Whatever CGI-based Perl module you are already using for your "quasi rexec functions" will have documentation on how to extract the body of a POSTed request. Refer to that for the details (or if you cannot find or understand the documentation, then reply here with specifics such as which module you are using and which version). Then it's just a matter of dumping it to a file and printing the appropriate headers and body back to the client which should be straightforward.