From a2ad2616339c6cf3e583d8a7e2d38c9a1a792018 Mon Sep 17 00:00:00 2001 From: k-mizutani-r <169642487+k-mizutani-r@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:50:59 +0900 Subject: [PATCH] =?UTF-8?q?DELETE=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index bfd5ba5..5545c28 100644 --- a/index.js +++ b/index.js @@ -10,10 +10,10 @@ const server = http switch (req.method) { case 'GET': - res.write(`GET ${req.url}`); + res.write(`GET ${req.url}\n`); break; case 'POST': - res.write(`POST ${req.url}`); + res.write(`POST ${req.url}\n`); let rawData = ''; req .on('data', chunk => { @@ -23,6 +23,9 @@ const server = http console.info(`[${now}] Data posted: ${rawData}`); }); break; + case 'DELETE': + res.write(`DELETE ${req.url}\n`); + break; default: break; }