Skip to content

Instantly share code, notes, and snippets.

@sfboss
Created October 6, 2022 02:57
Show Gist options
  • Select an option

  • Save sfboss/c32523fdb98e21e76dd5d66a2419e69d to your computer and use it in GitHub Desktop.

Select an option

Save sfboss/c32523fdb98e21e76dd5d66a2419e69d to your computer and use it in GitHub Desktop.
HttpReq
Http httpObject = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('http://fakeendpoint.com');
request.setHeader('Content-Type', 'application/json');
request.setMethod('POST');
HttpResponse response = httpObject.send(request);
String responseBody = response.getBody();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment