Kitura / Kitura/BlueSocket

Postman can not connect to the Example EchoServer

Open
#220 0 comments 0 reactions 1 assignee Claimed by @adam-rocska View on GitHub
Dominant language
Swift
Stars
1.4k
Forks
193
PR merge metrics
No merged PRs in 30d

Description

I copied the README example server `EchoServer` to a swift app with a MacOS target

trying to connect to the server using telnet succeeds as documented, but using postman or Insomnia connection fails with:

`Error: Parse Error: Expected HTTP/`

After updating the first write message to this:

```Swift

let startingMessage = """
HTTP/1.1 101 Switching Protocols
Date: "\(Date.now)"
Connection: "Upgrade"
Upgrade: "websocket"
Sec-WebSocket-Accept: "\(base64Response)"
"""

try socket.write(from: startingMessage)

```

the error goes away, however, the connection freezes on the Postman/Insomnia and no Frames can be sent/received.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.