argv2http Documentation forthcoming, take a look at the tests to get an idea of what's happening here.