Skip to content

Instantly share code, notes, and snippets.

@svkrclg
Last active December 19, 2021 16:58
Show Gist options
  • Save svkrclg/a036f905c4905a8894539247211a7f59 to your computer and use it in GitHub Desktop.
Save svkrclg/a036f905c4905a8894539247211a7f59 to your computer and use it in GitHub Desktop.
frame HTTP response
// Get output stream
DataOutputStream out = new DataOutputStream(socket.getOutputStream());
String message = "HTTP/1.1 200 OK\r\n" +
"Server: noob-server\r\n" +
"Date: 14 March, 1977\r\n" +
"\r\n" +
"Hello world - noob server";
out.write(message.getBytes());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment