Even in the modern era (>= 2017) it is still sometimes useful to
build simple web services using CGI scripts. Benefits include: ease of coding;
use of standard port 80; service uptime: even if the CGI script dies while
handling an earlier request, the script will be restarted for the next request.
Using this function, the body of an R CGI script can begin with:
req <- cgiRequest()
headers <- req$params
params <- req$params
...