Of course this entire thing could be cleaned up, and made slightly more generic using a construct like https://gist.github.com/cosmin/8278872

Then the code could look like:

```
HTTPResponse = inject(_HTTPResponse, HTTPMessage=HTTPMessage)
```

This would create a new class where all the methods in the original that use HTTPMessage would be replaced with new functions using the same code, but a replaced global scope.