Revert "Use NSURLComponents"

This reverts commit 4965ab00dc2e9f4314cd2bee40b38fe17d7c55d4.