Advertisement
Guest User

Untitled

a guest
Mar 21st, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. sap1.inputHttpHeaders_x = new Map<String, String>();
  2.  
  3. //Setting a basic authentication header
  4.  
  5. String username = 'SFDCUSER';
  6. String password = 'xxxxxxc1';
  7. Blob headerValue = Blob.valueOf(username + ':' + password);
  8. String authorizationHeader = 'BASIC ' +EncodingUtil.base64Encode(headerValue);
  9. sap1.inputHttpHeaders_x.put('Authorization',authorizationHeader);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement