question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use payload with websocket target

See original GitHub issue

Hi there!

Is it possible to use payload to customize target URL in Websocket ?

I’m trying to use this config:

config:
  payload:
    path: "users.csv"
    fields:
      - "access_token"
      - "login"
    skipHeader: true
  target: 'wss://localhost/websocket?auth={{ access_token }}'
  tls:
    rejectUnauthorized: false
  phases:
    - duration: 200
      arrivalRate: 1
scenarios:
  - engine: 'ws'
    flow:
      - think: 100

with the following CSV:

"access_token","login"
"A test token","Rykian"

But my auth param on server side is always undefined

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
hassycommented, Mar 8, 2019

Not possible at the moment, as target is set once for all virtual users. What we need to do is to add a connect action in the WebSocket engine, which can be used for custom connection parameters. Thanks for opening the issue @Rykian!

1reaction
smilyanpcommented, Sep 25, 2020

This is still an issue for me, please update once it is resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing WebSocket servers - Web APIs | MDN
A WebSocket server is nothing more than an application listening on ... The opcode field defines how to interpret the payload data: 0x0...
Read more >
What is WebSocket and How It Works? ⚙️ - Wallarm
All sorts of arbitrary application data and extension data are known as payload data. The client and servers use this data for negotiation...
Read more >
Working with routes for WebSocket APIs - Amazon API Gateway
Learn about developing WebSocket API routes. ... It specifies a JSON property that is expected to be present in the message payload.
Read more >
Why is Websocket sending garbage along with payload?
In my case I make sure state is OPEN and then send data. I am able to get data from web to my...
Read more >
Using Spring Boot for WebSocket Implementation with STOMP
The WebSocket protocol allows you to implement bidirectional communication between applications. It is important to know that HTTP is used only for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found