Create a UrlParams structure for HttpApi

Currently, we are using an array of objects for encoding url params, this could be done better with a `UrlParams` structure which maintains param ordering, and provides an `encode()` method.