title: Is it possible to connect to socket.io with get or post request?
body: <p>I am new in socket.io. I wanted to develop an small application using it. I know the basic of socket.io. I have followed <a href="https://socket.io/docs/" rel="nofollow noreferrer">this</a> and <a href="https://socket.io/get-started/chat/" rel="nofollow noreferrer">this</a> documentation. </p>
  
  <p>I am also able to make this simple connection. Code :</p>
  
  <p>Client:</p>
  
  <pre><code>&lt;script src="/socket.io/socket.io.js"&gt;&lt;/script&gt;
    &lt;script&gt;
          console.log(location.protocol+'//'+location.host);
                  var socket = io.connect(location.protocol+'//'+location.host), socketwithApi = io.connect(location.protocol+'//'+location.host + '/apikey/');
    &lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;
          var i=0;
                $(document).on('click','#socket-emit-btn', function(){
                  let message = location.href;
                  socket.emit("test",message);
  
                });
                socket.on("testlistened",function(data){
                    i ++;
                    console.log(i);
                    console.log(data);
                    if(data){
                      $("#console-div").html(data);
                    }else{
                      $("#console-div").html("{empty}");
                    }
                  });
  
                socketwithApi.on('apikey',function(data){
                     console.log(data);
                  });
      &lt;/script&gt;
  </code></pre>
  
  <p>Server:</p>
  
  <pre><code>   //consider everything needed is defined
      var apikey = io
        .of('/apikey/')
        .on('connection', function (socket) {
          socket.emit('apikey', { news: 'item' });
      });
  
      io.on('connection', function (socket) {
          let clientID = socket.id
          let clientIP = socket.handshake.address
          if (client) client.socket = socket
          console.log('User-Client Connected!: IP: ' + clientIP)
  
          socket.on("test",function(data){
              console.log("listened");
              let ParsedData = url.parse(data);
              let responseData = {
                  UrlScheme:ParsedData,
                  socketID: clientID,
                  api_key: ParsedData.pathname
              }
              console.log(responseData);
              console.log(`${TRANSACTIONGETRECEIPT}_RESPONSE`)
              socket
                  .binary(true)
                  .emit('testlistened', JSON.stringify(responseData))
          });
  
          socket.on('disconnect', function (data) {
              console.log(clientID + ' has disconnected')
          })
      })
  </code></pre>
  
  <p>Everything is working fine, i am able to emit and listen both from the server side and client side. But I did not find the documentation which would tell if it is possible to send http get or post request from the browser or postman to socket.io . Is it only possible to send request from a page where socket client is present or can we also send request like </p>
  
  <pre><code>  http://localhost:8099/api-hastgraph-key/socket.io/?EIO=3&amp;transport=websocket&amp;sid=w0kDs4oGI7SVwB3YAAAC
    or http://localhost:8099/socket.io/api-hastgraph-key?EIO=3&amp;transport=websocket&amp;sid=w0kDs4oGI7SVwB3YAAAC
  </code></pre>
  
  <p>from browser and connect to socket.</p>
  
  <p>Thank you. Any kind of help are highly appreciated.</p>