Double HTTP Requests + Workflow Consistency

Don’t know if this is the right place to post this question, as it’s more of a follow-up to this issue, but that issue is closed.

Anyway, I’m continually encountering a scenario where Bubble sends 2 HTTP requests on the first invocation, such as a button click. The issue was confirmed by Bubble support months ago…

On Fri, Mar 30, 2018 at 4:43 PM EDT, Neerja Balaji support@bubble.is wrote:
Our developers reviewed this and confirmed when certain properties are evaluated, it’s possible that more than 1 https request is sent. We plan to fix this as part of the workflow consistency guarantees in our roadmap. Please let us know if you have additional questions.

This issue is really quite problematic - especially when interacting with an external API. I spend far too much time implementing convoluted work-arounds. I didn’t see anything on the roadmap indicating that it was addressed.

Is anyone else impacted by this issue?

-Steve

Have you tried making the API call an Action instead of a Data, and run it on its own step, then pass the results to the write to the database?

Is the API call a GET or POST or something else?

Thanks very much for the reply, @mishav. In fact, I have not tried the call as an action. I will definitely do that.

I did, however, work around the issue outlined in my initial report by putting the API call in its own custom event and scheduling it with a zero second delay (presumably making it async).

However, I’ve encountered the issue again in a different context. I will try it as an action. Can you elaborate a bit on how to “pass the results” when using an action in a step?

EDIT: Oh, and it’s a POST request.

-Steve

Where you use the data, put in a dynamic expression and choose “results of step 1” for example.

Ah, ok. Got it. I’ll give that a shot.

-Steve