Forum Discussion

Akenefick's avatar
Akenefick
Genius
6 months ago

Trouble with http.client.response

I'm making the following http.client.request call in an endpoint. <#assign response = http.client.request("https", "api.cognitive.microsofttranslator.com", "/translate?api-version=3.0&to=es&textTyp...
  • MattV's avatar
    6 months ago

    Sounds like you're running into freemarker auto-escape. 

    https://freemarker.apache.org/docs/dgui_misc_autoescaping.html

    Basically you need to turn off autoescape or change outputformat to json. Also make sure your endpoint output format is set for application/json (this changes the content-type header in the endpoint response).

    You shouldn't need the ?replace after those changes.