Question: Given the below snippet extracted from the request handler in the to - do list Server. Complete the code for the POST method to read
Given the below snippet extracted from the request handler in the todo list Server. Complete the code for the POST method to read in data chunks as they arrive to the server
var list U; the todo list
const reqHandler reg res
switch reg method
case 'POST':
let item ;
req. setEncoding 'utf;
Fire data event when a data chunk arrives
reg.onAB
item CI;
;
req.onD
push the item on to the list
E
console. log list;
;
break; A B C D E
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
