Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
Obtener los datos de una solicitud PUT NodeJS http

Estoy tratando de obtener los datos de una solicitud PUT de un servidor http. He intentado lo siguiente:

 const http = require('http'); const server = http.createServer(async (req, res) => { const body = await new Promise(resolve => { const data = []; req.on('data', chunk => { data.push(chunk); }); req.on('end', () => { resolve(data.join('')); }); }); console.log(body); }); server.listen(80);

Pero cuando realizo una solicitud PUT a este servidor con el name 'Prueba' y el value 'Prueba' obtengo la siguiente respuesta:

 ------WebKitFormBoundary5irMnjtb69WOI025 Content-Disposition: form-data; name="Test" Test ------WebKitFormBoundary5irMnjtb69WOI025--

¿Cómo hago un objeto JSON de esto?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!