This file contains 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
HttpRequest req = new HttpRequest(); | |
req.setEndpoint('https://my_endpoint.example.com/some_path'); | |
req.setMethod('GET'); | |
// Because we didn't set the endpoint as a named credential, | |
// our code has to specify: | |
// - The required username and password to access the endpoint | |
// - The header and header information | |
String username = 'myname'; |
This file contains 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
HTTPRequest feedRequest = new HTTP Request(); | |
feedRequest.setEndpoint('callout:SalesforceNC/services/data/v32.0'); | |
feedRequest.setMethod('GET'); | |
HTTP http = new HTTP(); | |
HTTPResponse feedResponse = http.send(feedRequest); | |
System.debug(feedResponse.getBody()); |
OlderNewer