• This project
    • Loading...
  • Sign in

조인천 / Youtube_MPL

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • Youtube_MPL
  • nodejs-todo-list-master
  • node_modules
  • express
  • client.js
  • kimkyeonghun's avatar
    ver2 · c2026908
    c2026908
    kimkyeonghun authored 2019-05-29 20:06:36 +0900
client.js 405 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

var http = require('http');

var times = 50;

while (times--) {
  var req = http.request({
      port: 3000
    , method: 'POST'
    , headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
  });

  req.on('response', function(res){
    console.log(res.statusCode);
  });

  var n = 500000;
  while (n--) {
    req.write('foo=bar&bar=baz&');
  }

  req.write('foo=bar&bar=baz');

  req.end();
}