Created
October 6, 2022 02:56
-
-
Save sfboss/d97ceaabd6100284f9182cf7e5e27d0d to your computer and use it in GitHub Desktop.
An example HttpRequest in Apex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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