Simplify the parseCasting method
Use specific encoding for URL