artilleryio / artillery-core

artillery-core - deprecated
Mozilla Public License 2.0
29 stars 104 forks source link

WS get received data? #190

Closed Cristy94 closed 7 years ago

Cristy94 commented 7 years ago

Let's say we have a user login via WS, the client sends a message LOGIN through WS and receives back a token via a WS message. How can I read and save the token data in order to send it for new requests?

Can I subscribe to WS.onmessage method?

Cristy94 commented 7 years ago

Nevermind, you can access the ws object in your JS functions: userContext.ws.