Make sure the API request url is always set properly

Change-Id: I7de2f32b0729bc60ce1185e7c50eea29bb30f657