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


1 Answer 1


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.

  • Thank you David. This is working. I had tried URL encoding using EncodingUtil.urlEncode, but can pass %7B, %7D separately. Commented Jan 3, 2020 at 3:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .