Created
January 29, 2016 17:28
-
-
Save wess/dfc5b6dd7e6605fb1186 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let message = "Hello World" | |
let contentLength = message.utf8.count | |
server.write("HTTP/1.1 200 OK\n") | |
server.write("Server: Pilot Example \n") | |
server.write("Content-length: \(contentLength)\n") | |
server.write("Content-type: text-plain\n") | |
server.write("\r\n") | |
server.write(message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment