Salesforce PDII Question Answer
Consider the following code snippet:
Java
HttpRequest req = new HttpRequest();
req.setEndpoint('https://TestEndpoint.example.com/some_path ');
req.setMethod('GET');
Blob headerValue = Blob.valueOf('myUserName' + ':' + 'strongPassword');
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization', authorizationHeader);
Http http = new Http();
HTTPResponse res = http.send(req);
Which two steps should the developer take to add flexibility to change the endpoint and credentials without needing to modify code?1
Salesforce PDII Summary
- Vendor: Salesforce
- Product: PDII
- Update on: Dec 26, 2025
- Questions: 161

