Hello,
I am working on integration requirement and consuming external API to interface external data.
External API used for creating file and fill data into file.
Below sample template we have set on postman to fill data in the created file
Template:
<#if addHeader == true>
Customer,Amount,OrderNumber,PaymTerm,Item<#lt>
</#if>

I am looking for your help to setup template details through X++
I have tried below but get the error:
Sample code:
Method()
{
System.Net.WebHeaderCollection httpHeader;
str template = @'<#if addHeader == true>
Customer,Amount,OrderNumber,PaymTerm,Item<#lt>
</#if>;
httpHeader = new System.Net.WebHeaderCollection();
httpHeader.Add("name","application/x-www-form-urlencoded");
httpHeader.Add("ContentType","application/x-www-form-urlencoded");
httpHeader.add("template", template);
}
Error: Below error we have received on httpHeader.add("template",template) line of code
