Corrected request generation code

The code was using url + BASEURL but the url was generated during the
connection.