Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String endPointURL = 'https://api.boomi.com/api/rest/v1/AccountID/EnvironmentExtensions/XXXXXXXXXX';
- String userName = 'XXXXXX';
- String password = 'XXXXXXX';
- String body= '';
- String query;
- query = '';
- Blob headerValue = Blob.valueOf(userName + ':' + password);
- String authorizationHeader = 'BASIC ' +
- EncodingUtil.base64Encode(headerValue);
- accs1 = new List<cAccount>();
- Httprequest request = new HttpRequest();
- Http http = new Http();
- request.setMethod('POST');
- request.setEndpoint(endPointURL);
- request.setHeader('Content-Type', 'application/json');
- // Header info with remote server user name and password
- request.setHeader('Authorization', authorizationHeader);
- request.setBody(query);
- request.setTimeout(120000);
- request.setBody(query);
- //Making call to external REST API
- HttpResponse response = http.send(request);
- System.debug('responseBody: '+response.getBody());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement