encodeURIComponent on api