I got a problem that is driving me crazy. Hopefully you guys can help:
I am trying to integrate the eKomi Api.
For this I am doing a callout which returns the response System.HttpResponse[Status=OK, StatusCode=200]. So everything seems fine.
However, when I try to debug the body via getBody(), I get the following error message:
FATAL_ERROR|System.CalloutException: Could not parse HTTP response body to string
When I enter the callout in my browser, I receive the following response:
{"link":"https:\/\/www.ekomi.de\/kundenmeinung.php?kunde=customerId&shop=shopId","hash":"hash","known_since":"2017-07-24","done":1,"done_at":1500974822}
When I try to debug this String, I get the following error message upon deploy:
Validation Failed ERROR validating ApexClass classes/SendEkomiReviewRequest.cls: Invalid string literal '{"link":"https://www.ekomi.de/kundenmeinung.php?kunde=customerId&shop=shopId","hash":"hash","known_since":"2017-07-24","done":1,"done_at":1500974822}'. Illegal character sequence '/' in string literal.
The problem is that I can't change what's in the response. As the validation of the string fails, I can neither remove nor replace the illegal character sequence.
Do you have any idea what to do here? I'm desperate for any ideas.
Thanks a lot Daniel