Skip to main content

WebSocket

WebSocket is a protocol that enables real-time, two-way communication between a client (like a web browser) and a server. Unlike traditional HTTP, which requires a new connection for each request, WebSocket maintains a single, open connection. This allows for immediate data exchange, making it perfect for applications like online gaming, live chats, and financial trading.

Key Features:

  • Real-Time Communication: Send and receive messages instantly.
  • Low Latency: Quick updates without the need to reconnect.
  • Efficient: Uses less data during communication compared to standard HTTP.

Usingvariables

Different Ways to Add WebSocket

There are several methods to add a WebSocket connection in your application. Below are the primary approaches:

From Main Screen

Users can easily add a WebSocket connection directly from the main screen of the application. This method provides a straightforward interface, allowing for quick setup without navigating through multiple menus.

Usingvariables

From the Left-Panel Section

Steps:

  1. Open the application.
  2. Click the "+" button in the left panel.
  3. Select the "Add WebSocket" option from the dropdown.

Usingvariables

From the Collection Section

Steps:

  1. Open the application.
  2. Click the "Collection" option in the left panel.
  3. Click on the three dots next to the collection.
  4. Select the "Add New WebSocket" option from the dropdown.

Usingvariables

Using WebSocket Icon in Collection Section

Steps:

  1. Open the application.
  2. Click the "Collection" option in the left panel.
  3. Click on the WebSocket icon.

Usingvariables

How to Connect WebSocket

  1. Enter Connection Details: Input the WebSocket URL, along with any required messages, headers, and parameters.
  2. Click the Connect Button: After entering all information correctly, click the "Connect" button.

Usingvariables

  1. Confirmation: After a successful connection, you will see a confirmation message on the right side of the window, indicating that the WebSocket is connected and ready for use.

Usingvariables

How to Interact with WebSocket

  1. Enter the Message: Type your message in the correct format.
  2. Click Send: After composing the message, click the "Send" button.
  3. Wait for Response: The WebSocket will process the message and respond.
  4. View Response: Click on the response to view it in the bottom window.

Usingvariables

How to Change Response Format, Copy, and Download Responses

  1. Change Response Format: After opening the response details, click the "Format" dropdown to view the response in different structures.

Usingvariables

  1. Copy the Response: Click the "Copy" icon to copy the response. A toast message will confirm the action.

Usingvariables

  1. Download the Response: Click the "Download" icon to save the response file to your system.

Usingvariables

Search, Filter, Scroll, and Delete Messages

Search Messages:

  • Enter your search query in the search box. Results will filter automatically.

  • To clear the search input, click the cross icon.

    Usingvariables

Filter Messages:

  • Use the "Filter Messages" dropdown to view:

    • All Messages: Shows all messages.
    • Sent: Displays only sent messages.
    • Received: Displays only received messages.

    Usingvariables

Scroll:

  • Scroll to Bottom: Click the bottom arrow to navigate to the latest messages.
  • Scroll to Top: Click the top arrow to go to the first message.

Usingvariables

Delete Messages:

  • Click the delete icon to remove all messages. A confirmation toast will appear.

Usingvariables

Clear Input:

  • Click "Clear Input" to erase the message input field. A confirmation toast will appear.

Usingvariables

How to Save WebSocket for Future Use

You can save the WebSocket connection in a folder or collection to use later. This way, you won’t have to enter your credentials again, making it quicker and easier to reconnect when you need to.

  1. Click Save: After setting up the WebSocket, click the "Save" button.

Usingvariables

  1. Select a Collection: Choose an existing collection or create a new one.

Usingvariables

  1. Choose a Folder: Select a folder to store the WebSocket.

Usingvariables

  1. Edit WebSocket Name: Optionally, change the default name.

Usingvariables

  1. Add a Description: Optionally, add a description for easier identification.

Usingvariables

  1. Click Save: Confirm and save the WebSocket for future use.

Usingvariables