added tests, refactored HttpRequest into an interface.

Finally on public repo, yay!