Skip to content

Instantly share code, notes, and snippets.

@arun12209
Last active Jun 9, 2022
Embed
What would you like to do?
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