Merge pull request #638 from kaysoky/Revert_incompleteCommit

Revert broken commit
Make sure to decode the string before sending it as a query, otherwise it'll get double-encoded.
Moving endpoint resolution into platform