You could shave some lines of code with something like `require(protocol.replace(':', '')).get(…)`.