Newlines in dynamic content
When writing dynamic content, particularly when concatenating strings, I need newlines to be included in the resulting string.
That's a terrible summary, but here's my real example. I have an HTTP dataset which requires a multi-line header
Accept:application/json
Installation:<GUID>
Where <GUID> is defined by a parameter. Before I parameterized that value, I put in a single literal GUID, so the newline I typed into the Additional Headers field worked fine. Now that it's parameterized, I have a dynamic content expression like
@concat('Accept:application/json\nInstallation:', dataset().installationId)
I'd expect the resulting string to have the Accept and Installation headers on separate lines, as in my sample headers, but they're all on one line with the \n literal like so:
Accept:application/json\nInstallation:<GUID>

3 comments
-
Anonymous commented
I hit this the other day - you can use the REST connector which allows you to enter multiple headers. However, REST only allows "Accepts json/application" you can't override that, thus I had to switch back to HTTP connector.
-
Sohi commented
Thank you very much @Jason. The base64 encoded string works.
-
Russ R commented
This worked, so I'm adding votes to this
base64ToString('Cg==')