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

211
Views
HTTP: el método PUT devuelve el estado 200 pero no se colocan datos en la base de datos

Soy nuevo y no sé por qué mi solicitud PUT no insertó los datos en la base de datos.

 const orderId = JSON.stringify(1000 + Math.floor(Math.random() * 5000)); await fetch(`http://0.0.0.0:9010/fdb/pos/collection/order/${orderId}`, { "method": "PUT", "headers": { "Content-Type": "application/json" }, "body": JSON.stringify({ merchantId, "_id": orderId, "lineItems": cartItems, "paymentIntent": paymentIntent.id, "status": "stripePendingPayment", "rejectedReason": "", "totalPrice": String(basketTotalPrice * 100), "updatedTs": new Date(), "createdTs": new Date() }) }).then(r => console.log(r.status));

El registro devolvió el estado 200 pero sin datos. Funciona con el método POST pero no con PUT. ¿Alguien tiene alguna idea de por qué es eso?

Cualquier aporte es bienvenido gracias de antemano.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

PUT es para actualizar los datos, tal vez este método solo diga que actualizó correctamente el contenido.

about 4 years ago · Juan Pablo Isaza Report
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!