0

I am using HTTP get method to get the data from API,But the response returned from the API is not encoded in proper format.The Same response in Postman looks perfect. The content from Postman looks like

“Göttingen Channels”

The content which i receive in LP as a result of GET METHOD is

“Göttingen Channelsâ€

Header key value pairs which i set in HTTP GET method is

var headerNames = ["secret-token", "apikey","Accept-Encoding"];

var headerValues = ["78996", "4128","utf-8"];

And the response headersfrom get method which i debugged from IE inspector looks like

what change should i implement in the headers to get the exact characters printed?It looks like i am missing some thing in my code.

  • 1
    I don't have an answer, but I can certainly understand your frustration, as I had a similar problem recently trying to get emoji to be passed in through a REST API without corruption. In my situation, I resolved the issue by changing from HttpPost to HttpGet. Have you tried other settings for the char set? Maybe charset=ISO-8859-1? salesforce.stackexchange.com/questions/203193/… – PatMcClellan__c Feb 6 '18 at 23:43
  • Can you try setting the headernames to "content-type" and values as "text/html;charset=utf-8" – Lakshmi Feb 7 '18 at 4:12
  • MC SSJS HTTP GET method is not allowing to set the content-type as header value, i get error when we set the content type – Manoj Chandran Feb 7 '18 at 14:07

Your Answer

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

Browse other questions tagged or ask your own question.