Actually I'm doing Adobe connect integration with Salesforce.For that I wrote the REST api that works perfectly but here the problem is for every time i'm checking the cookie value is changed , so how to maintain the cookie values in apex class.
if anybody having idea please help me
This is my REST class:
global class LeadExportToAdobe{
@future (callout=true)
global static void exportLead(String username, String password, String endpointUrl,String LastName,String Email){
Http http = new Http();
HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Blob headerValue = Blob.valueOf(username + ':' + password);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization', authorizationHeader);
req.setHeader('Content-Type', 'application/json');
req.setEndpoint(endpointUrl+'/api/xml?account-id=1300650024&session=apac1breezkaiod5x45829zuo9&action=event-register&sco-id=1306838132&login=Email&password=1234&password-verify=1234&first-name=LastName&last-name=LastName');
req.setMethod('POST');
try{
res = http.send(req);
System.debug('MyResult == :'+res.getBody());
} catch(System.CalloutException e){
System.debug('Callout error: '+ e);
}
}
}