New Year Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmasmnth

Consider the following code snippet:JavaHttpRequest req = new HttpRequest();req.

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

A.

Use req.setEndpoint(Label.endPointURL);

B.

Use req.setEndpoint('callout:endPoint_NC'); within the callout request.2

C.

Store the URL of the3 endpoint in a custom Label named endPointURL.4

D.

Create a Named Credential, endPoint_NC, to store the endpoint and credentials.5

Salesforce PDII Summary

  • Vendor: Salesforce
  • Product: PDII
  • Update on: Dec 26, 2025
  • Questions: 161
Price: $52.5  $149.99
Buy Now PDII PDF + Testing Engine Pack

Payments We Accept

Your purchase with ExamsVCE is safe and fast. Your products will be available for immediate download after your payment has been received.
The ExamsVCE website is protected by 256-bit SSL from McAfee, the leader in online security.

examsvce payment method