Guest User

Untitled

a guest
Feb 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. @RemoteAction
  2. global static Object invoke(String methodName, String[] params) {
  3.  
  4. // Create a Continuation for the HTTPRequest
  5. Continuation con = new Continuation(60);
  6. con.continuationMethod = 'callback';
  7.  
  8. ...
  9. //Add http request to continuation
  10.  
  11. return con;
  12. }
  13.  
  14. global static Object callback(list<string> labels, Object state) {
  15. system.debug(labels);
  16. for (string l : labels) {
  17. system.debug(l);
  18. HttpResponse response = Continuation.getResponse(l);
  19. system.debug(response);
  20. }
  21.  
  22. ...
  23. }
Add Comment
Please, Sign In to add comment