Created
January 15, 2018 07:11
-
-
Save sfdcfanboy/1eabb61451357a0e19cbf23c0207ccc7 to your computer and use it in GitHub Desktop.
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()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying Named Credential with Password Authentication
HttpRequest req = new HttpRequest();
req.setEndpoint('callout:HTTP_Basic_Credential/services/data/v32.0');
req.setMethod('GET');
Http http = new Http();
HttpResponse res = http.send(req);
System.debug(res.getBody());
This code is giving me below error:
if Generate Authorization Header is checked
[{"message":"INVALID_HEADER_TYPE","errorCode":"INVALID_AUTH_HEADER"}]
if Generate Authorization Header is not checked,then it is giving session expired.