Added funcionality for custom api server url