Skip to main content
Greg Coogan が「#Apex」で質問
I am integrating with an external endpoint. The first step is to retrieve a token. When I first developed my solution, I did it all in Apex. However, I ran into an issue where my code would proceed to do a POST (my second step) before the token was recieved. As a result, I switched to using Javascript and its "Promises" on the Visualforce page that is run via custom button. In Apex, how would you replicate the Javascript Promises functionality that waits for a token to be received?
2 件の回答
  1. 2018年7月5日 16:39
    I realize we don't have Promises in Apex. I'm asking how would you code a similar solution in Apex. I was thinking something of a While loop, but wanted to hear from other developers that may have done it in the past.

    Also, I could not exactly tell what you mean by "what i coud say is defind the apex code that call from the response by using apex."
0/9000