# websocket-request **Repository Path**: npm-packages/websocket-request ## Basic Information - **Project Name**: websocket-request - **Description**: Made websocket to Request response mode. Imitate the request and response mode of HTTP, send a request and wait for the response to return. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-05-27 - **Last Updated**: 2022-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # websocket-request ## About Made websocket to Request response mode. Imitate the request and response mode of HTTP, send a request and wait for the response to return. ## How use ### npm ```bash npm i websocket-request --save ``` ### yarn ```bash yarn add websocket-request -S ``` ### example ```javascript const WS = require("websocket-request"); async function test(){ const ws = new WS('ws://localhost'); await ws.open(); let res=await ws.request('data'); console.log(res); } test().then(()=>{}); ```