title: testing websockets with postman new api
body: <p>I am trying to get the postman api for websockets working, however I can't even make a connection:</p>
  <p>When I try to make a connection</p>
  <pre><code>ws://localhost:5001/socket.io/
  
  </code></pre>
  <p>results in:</p>
  <pre><code>Error: Unexpected server response: 400 //for ws
  </code></pre>
  <pre class="lang-js prettyprint-override"><code>
  //index.js
  const port=5001
  io.on(&quot;connection&quot;, (socket) =&gt; {
    //handshake and hydrate and test
    console.log(&quot;Client connected&quot;,socket.id);
    socket.on(&quot;test&quot;, (data)=&gt;{
      console.log(&quot;test data is:&quot;,data)
      socket.emit(&quot;test&quot;, &quot;server heard you!&quot;)
    });
  
  </code></pre>
  <p>what is the proper url string to connect to a socket.io/express/nodejs server?</p>