Discussions

Ask a Question
Back to All

How to shorten the url if the url has spaces

I am calling the Rebrandly Api from an Apex class in my salesforce app. The destination url is very long and it contains spaces in it. I think the space is causing problem because the url is returning this:
'[{"code":"InvalidFormat","property":"destination","message":"Url is not valid","verbose":"Invalid format for destination"}]}' error.
So ,is there any way to fix it?

Thanks very much.