Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RemoteAction
- global static Object invoke(String methodName, String[] params) {
- // Create a Continuation for the HTTPRequest
- Continuation con = new Continuation(60);
- con.continuationMethod = 'callback';
- ...
- //Add http request to continuation
- return con;
- }
- global static Object callback(list<string> labels, Object state) {
- system.debug(labels);
- for (string l : labels) {
- system.debug(l);
- HttpResponse response = Continuation.getResponse(l);
- system.debug(response);
- }
- ...
- }
Add Comment
Please, Sign In to add comment