With "Allow Merge Fields in HTTP Body" flag enabled on Named Credentials, the character "{" gets removed from the HTTP Request Body
Last updated 16 days ago ·Reference W-9442864 ·Reported By 1 users
In Review
Summary
Named Credential always removes the opening curly bracket from the request body when these characters are without any space/other characters in between if the "Allow Merge Fields in HTTP Body" flag is enabled.
Repro
1. Create Named Credentials in the Org with "Allow Merge Fields in HTTP Body" enabled. Any URL is Ok if you can review the request body. RequestBin or Beeceptor may be useful to capture the request.
2. Open Developer Console in the Org and execute the below code snippet through Anonymous block.
--
Http h = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('callout:RequestBin);
request.setMethod('POST');
request.setBody('11{{{{123123');
HttpResponse response = h.send(request);
--
3. Review the captured request. In the Raw Body, you will find 11{123123 instead of 11{{{{123123.
4. When you separate the 2 curly brace characters with space(or any other char), issue doesn't reproduce.
Workaround
N/A
Reported By (1)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.
