Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HTTP h = new HTTP();
- HTTPRequest r = new HTTPRequest();
- r.setEndpoint('https://my.domain.com');
- Blob headerValue = Blob.valueOf(username + ':' + password);
- String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
- r.setHeader('Authorization', authorizationHeader);
- r.setMethod('GET');
- HTTPResponse resp = h.send(r);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement