You need to sign in to do that
Don't have an account?
ZAPEX
System.CalloutException: The URI is invalid.
I am getting System.CalloutException: The URI is invalid when I am calling a Rest endpoint with spaces.
The endpoint I am trying to call looks like this and it has spaces
...../CUSTOMERS?$orderby=CUST asc&$top=100&$filter=CUST gt 0
unfortunately, apex see this as invalid URI.
I tried URL encode but then the service I am calling returned an error. so the call has to include the spaces in the URI
I also tried to set header to 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' although I saw it used only for POST and PUT while I am doing GET
any idea how to resolve?
The endpoint I am trying to call looks like this and it has spaces
...../CUSTOMERS?$orderby=CUST asc&$top=100&$filter=CUST gt 0
unfortunately, apex see this as invalid URI.
I tried URL encode but then the service I am calling returned an error. so the call has to include the spaces in the URI
I also tried to set header to 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' although I saw it used only for POST and PUT while I am doing GET
any idea how to resolve?