Oriol Sancho
Oriol Sancho

Reputation: 11

HTTP request with socket.io

Is there a way to perform GET and POST requests using only socket.io-client? Regardless of the server framework.

Something like socket.emit('/endpoint', req).

Upvotes: 0

Views: 239

Answers (1)

Fabian Strathaus
Fabian Strathaus

Reputation: 3570

You are confusing Websocket protocol with HTTP (another protocol). GET and POST are HTTP methods and have nothing to do with Websockets.

The only similarity between Websocket and HTTP is, that both are using TCP on the layer below.

Upvotes: 1

Related Questions