Skip to content

Commit

Permalink
wip: need to get addTrailers to work first
Browse files Browse the repository at this point in the history
  • Loading branch information
satyarohith committed Mar 5, 2024
1 parent 15271fe commit 133b390
Show file tree
Hide file tree
Showing 4 changed files with 685 additions and 85 deletions.
14 changes: 14 additions & 0 deletions a.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import http2 from "node:http2";

const server = http2.createServer((req, res) => {
console.log("handler called");
console.log(req);
res.setHeader("Content-Type", "text/html");
res.setHeader("X-Foo", "bar");
res.writeHead(200, { "Content-Type": "text/plain; charset=utf-8" });
res.write("Hello, World!");
console.log(res);
res.end();
});

server.listen(8000);
Loading

0 comments on commit 133b390

Please sign in to comment.