3 Replies Latest reply: Jan 30, 2018 4:13 AM by Sandeep Roy RSS

    Overwrite POST body with Qlik REST Connector

    Markus Lehtola

      I'm trying to overwrite the POST request body with Qlik Rest Connector. As in documentation the syntax is WITH CONNECTION(body "<Overwrite>") . This works great as long the body does not contain double quotes (").

       

      My use case sending email with sendgrid API and post body is like this:

       

      {"personalizations": [{

           "to": [{"email": "some@example.com"}]}],

           "from": {"email": "some@example.com"},

           "subject": "Sending with SendGrid is Fun","

           content": [{"type": "text/plain", "value": "and easy to do anywhere"}

      ]}

       

      This works great when creating the connection with Create connection wizard, but when I try to manipulate the body in script with WITH CONNECTION (body "{newBody}") that contains double quotes the script fails.

       

      Is there a way to escape double quotes in the WITH CONNECTION (body "")?