Sandeepa
Sandeepa

Reputation: 3755

Are k6 http calls asynchronous?

Are k6 http calls asynchronous? When I execute a call like http.get(url, params) is k6 waiting until the response?

If it is asynchronous and let's say I'm executing few calls and I want the response of a one call as the parameter to another call. How can I wait before executing the 2nd call until the response is returned from 1st one?

Upvotes: 3

Views: 7003

Answers (2)

Fijula Azhikoden
Fijula Azhikoden

Reputation: 11

Please do refer the latest documents on K6.AS per the new release ,v0.43 contains two releases which includes v0.43.0 and v0.43.1. v0.43.0 brings one of the most demanded k6 features: a friendlier syntax for working with asynchronous functionality via Javascript's async and await. Hope this will solve your query.

Upvotes: 1

cuonglm
cuonglm

Reputation: 2806

Fortunately, k6 currently does not support asynchronous, or more generally, event loop.

You can read here for more details about how script execution.

Note

We have plan to support event loop, but I can't tell you now when it will happen.

Upvotes: 3

Related Questions