fixed example and using Ti.Network's encodeURIComponent