Generated HttpRequest Object from string

This code would be better off in a test case.