I am using Continuation to make API calls from lightning component. And noticed that if endpoint contains Curly braces, callback method is not getting called and we get "Communication error, please retry or reload the page" error on lightning component. Is this a defect? Any workaround? Example for endpoint: http://abc.com/api/v2/{7c2b1ab5-40805b81c898}/documents



That isn't a valid URL. Curly braces need to be percent-encoded when they appear in a URL, as other invalid and/or "unwise" characters as defined by the RFC. See When, if ever, should characters like { and } (curly braces) be percent-encoded in URLs? .

Replace the bracketed segment in your URL with %7B7c2b1ab5-40805b81c898%7D.

| improve this answer | |
  • Thank you David. This is working. I had tried URL encoding using EncodingUtil.urlEncode, but can pass %7B, %7D separately. – Shrivaths Kulkarni Jan 3 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.