var fs = require('fs');
var argv = require('yargs')
  .option('c', {
    alias: 'client',
    type: 'array'
  })
  .option('s', {
    alias: 'search',
    type: 'string'
  })
  .option('f', {
    alias: 'file',
    type: 'string'
  })
  .argv;

var clients = argv.client;
var search = argv.search;
var filename = argv.file;
var fileArray = [];

console.log(clients);
console.log(search);

fs.readFile(filename, 'utf8', function(err, data) {
  if (err) throw err;
  fileArray = data.match(/([^\s]+\s\s*){1,200}/g);
  console.log(fileArray);
});

@@ -1,12 +1,15 @@
 var 
+%0A  
 fs = req
@@ -18,21 +18,18 @@
 re('fs')
-;%0Avar
+%0A 
  argv = 
@@ -45,16 +45,18 @@
 yargs')%0A
+  
   .optio
@@ -60,32 +60,34 @@
 tion('c', %7B%0A    
+  
 alias: 'client',
@@ -87,24 +87,26 @@
 lient',%0A    
+ 
+ 
 type: 'array
@@ -107,23 +107,27 @@
 'array'%0A
+  
   %7D)%0A  
+ 
+ 
 .option(
@@ -129,24 +129,26 @@
 tion('s', %7B%0A
+  
     alias: '
@@ -156,24 +156,26 @@
 earch',%0A    
+  
 type: 'strin
@@ -177,21 +177,25 @@
 string'%0A
+  
   %7D)%0A
+  
   .optio
@@ -203,24 +203,26 @@
 ('f', %7B%0A    
+  
 alias: 'file
@@ -224,16 +224,18 @@
 'file',%0A
+  
     type
@@ -245,23 +245,27 @@
 string'%0A
+  
   %7D)%0A  
+ 
+ 
 .argv;%0A%0A
@@ -268,16 +268,19 @@
 v;%0A%0Avar 
+%0A  
 clients 
@@ -292,21 +292,19 @@
 v.client
-;%0Avar
+,%0A 
  search 
@@ -316,21 +316,19 @@
 v.search
-;%0Avar
+,%0A 
  filenam
@@ -344,13 +344,11 @@
 file
-;%0Avar
+,%0A 
  fil
@@ -362,206 +362,936 @@
 = %5B%5D
-;%0A%0Aconsole.log(clients);%0Aconsole.log(search);%0A%0Afs.readFile(filename, 'utf8', function(err, data) %7B%0A  if (err) throw err;%0A  fileArray = data.match(/(%5B%5E%5Cs%5D+%5Cs%5Cs*)%7B1,200%7D/g);%0A  console.log(fileArray);%0A%7D
+,%0A  count = 0,%0A  postData = querystring.stringify(%7B%0A    'content': fileArray%5B0%5D,%0A    'search': search%0A  %7D),%0A  options = %7B%0A    protocol: 'http',%0A    host: 'localhost',%0A    port: 8080,%0A    method: 'POST',%0A    path: '/',%0A    headers: %7B%0A      'Content-Type': 'application/json',%0A    %7D%0A  %7D,%0A  request = null;%0A%0Afs.readFile(filename, 'utf8', function(err, data) %7B%0A  if (err) throw err;%0A  fileArray = data.match(/(%5B%5E%5Cs%5D+%5Cs%5Cs*)%7B1,200%7D/g);%0A  console.log(fileArray);%0A%7D);%0A%0Arequest = http.request(options, function(res) %7B%0A  console.log('STATUS: ' + res.statusCode);%0A  console.log('HEADERS: ' + JSON.stringify(res.headers));%0A  res.setEncoding('utf8');%0A  res.on('data', function (chunk) %7B%0A    console.log('BODY: ' + chunk);%0A  %7D);%0A  res.on('end', function() %7B%0A    console.log('No more data in response.')%0A  %7D);%0A%7D);%0A%0Arequest.on('error', function(e) %7B%0A  console.log('problem with request: ' + e.message);%0A%7D);%0A%0Arequest.write(postData);%0Arequest.end(
 );%0A

Add http request with required params