Fixed argument order for factory method and hard coded HTTP protocol

In hindsight, these should be in separate commits, though they are pretty trivial changes.