This package will help you to send requests to web socket using a simple API rest. Useful for development proposes, using this tool you can send socket.io requests from postman or similar tools and get the result
npm install -g easy-wsapiproxy@latest
-
Install the npm wsapiproxy
-
Run the tool
easy-wsapiproxy <api-port>
- Send a post with the following body
{
"url": "http://", // 👉 http or ws
"emitter": "", // 👉 event name
"listeners": [], // 👉 list of listeners
"headers": { // 👉 key, value pair object
"Authorization": "bearer XXXXX.XXXXX.....",
},
"argument": {} // 👉 Object to request
}
- Result structure
{
"response": {
"listener" : "", // 👉 What listener response
"result": {} // 👉 The result from the websocket
},
"_request": {}, // 👉 The request you sent,
}
If someone wants to add or improve something, I invite you to collaborate directly in this repository: easy-wsapiproxy
- Clone the repository.
- Install dependencies.
- Make your changes.
- Run the command
npm run start:dev <api-port>
. - Happy programming
Project: in progress Thank you for using this NPM
- Author - Luis Arias 2021 <ariassd@gmail.com> GitHub profile
This software is licensed under MIT License
May 2021