Encoding the endPoint url before opening connection.

https://swrvedev.jira.com/browse/SWRVE-5457

https://github.com/Swrve/swrve-sdk/pull/749