Skip to content

Commit

Permalink
Merge pull request #53 from pestsov-v/feature
Browse files Browse the repository at this point in the history
http/2
  • Loading branch information
pestsov-v authored May 30, 2022
2 parents 3523876 + d704440 commit 94b0904
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .data/checks/1sj2n0j8tjqtjxrzgxtv.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"1sj2n0j8tjqtjxrzgxtv","userPhone":"0951699263","protocol":"http","url":"google.com","method":"get","code":[200,201],"time":2,"state":"down","lastChecked":1653916042138}
{"id":"1sj2n0j8tjqtjxrzgxtv","userPhone":"0951699263","protocol":"http","url":"google.com","method":"get","code":[200,201],"time":2,"state":"down","lastChecked":1653916522189}
2 changes: 1 addition & 1 deletion .data/checks/429ykgzbtxyj8a323g44.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"429ykgzbtxyj8a323g44","userPhone":"0951699263","protocol":"http","url":"google.com","method":"get","code":[200,201],"time":2,"state":"down","lastChecked":1653916042142}
{"id":"429ykgzbtxyj8a323g44","userPhone":"0951699263","protocol":"http","url":"google.com","method":"get","code":[200,201],"time":2,"state":"down","lastChecked":1653916522188}
2 changes: 1 addition & 1 deletion .data/checks/eleutudqqxfnkju1lw9u.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"eleutudqqxfnkju1lw9u","userPhone":"0951699263","protocol":"http","url":"google.com","method":"get","code":[200,201],"time":2,"state":"down","lastChecked":1653916042140}
{"id":"eleutudqqxfnkju1lw9u","userPhone":"0951699263","protocol":"http","url":"google.com","method":"get","code":[200,201],"time":2,"state":"down","lastChecked":1653916522219}
2 changes: 1 addition & 1 deletion .data/checks/jjm95n5h50lznpxw8tjk.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"jjm95n5h50lznpxw8tjk","userPhone":"0951699263","protocol":"http","url":"pestsov.com","method":"get","code":[200,201],"time":1,"state":"down","lastChecked":1653916041974}
{"id":"jjm95n5h50lznpxw8tjk","userPhone":"0951699263","protocol":"http","url":"pestsov.com","method":"get","code":[200,201],"time":1,"state":"down","lastChecked":1653916522054}
2 changes: 1 addition & 1 deletion .data/checks/rco2iex3qmd8jbxrab1f.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"rco2iex3qmd8jbxrab1f","userPhone":"0951699263","protocol":"http","url":"undefined","method":"get","code":[200,201],"time":1,"state":"down","lastChecked":1653916042979}
{"id":"rco2iex3qmd8jbxrab1f","userPhone":"0951699263","protocol":"http","url":"undefined","method":"get","code":[200,201],"time":1,"state":"down","lastChecked":1653916523036}
2 changes: 1 addition & 1 deletion .data/checks/utfofafx5mecgkj9qneb.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"utfofafx5mecgkj9qneb","userPhone":"1231201549","protocol":"http","url":"google.com","method":"get","code":[200,201],"time":2,"state":"down","lastChecked":1653916042141}
{"id":"utfofafx5mecgkj9qneb","userPhone":"1231201549","protocol":"http","url":"google.com","method":"get","code":[200,201],"time":2,"state":"down","lastChecked":1653916522189}
17 changes: 17 additions & 0 deletions misc/http2-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const http2 = require("http2");

var client = http2.connect("http://localhost/6010");
const req = client.request({
":path": "/",
});

var str = "";
req.on("data", function (chunk) {
str += chunk;
});

req.on("end", function () {
console.log(str);
});

req.end();
13 changes: 13 additions & 0 deletions misc/http2-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const http2 = require("http2");

var server = http2.createServer();

server.on("stream", function (stream, headers) {
stream.respond({
status: 200,
"content-type": "test/html",
});
stream.end("<html><body><p>Hello http2<p></body></html>");
});

server.listen(6010);

0 comments on commit 94b0904

Please sign in to comment.