Support overriding base api URL

Following up on https://twitter.com/antony/status/420273629348130816