Skip to content

Instantly share code, notes, and snippets.

@arun12209
Last active June 9, 2022 15:33
Show Gist options
  • Save arun12209/fe30c9d72bb83bee973a7251b15755bd to your computer and use it in GitHub Desktop.
Save arun12209/fe30c9d72bb83bee973a7251b15755bd to your computer and use it in GitHub Desktop.
HTTPRequest hr = new HTTPRequest();
hr.setEndpoint('callout:Bank/accounts/DynamicsCorporation?accountType=Checking');
hr.setMethod('POST');
hr.setHeader('Accept', 'application/json');
hr.setHeader('Content-Type', 'text/plain');
hr.setTimeout(120000);
HTTP h = new http();
String responseBody = h.send(hr).getBody();
system.debug('response : '+ responseBody);
Map<String,Object> m = (Map<String,Object>) JSON.deserializeUntyped(responseBody);
for(String key: m.keySet()){
system.debug(key + '=>'+m.get(key));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment