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

203
Views
Reaccionar, buscar enviando cuerpo vacío

Así que tengo un problema con el envío de una solicitud. El cuerpo no está vacío en absoluto ya que puedo registrarlo. Pero de alguna manera, cuando hago una solicitud, el cuerpo está vacío. Era extraño, así que copié un código de solicitud de trabajo que no enviaba un cuerpo vacío, ¿adivinen qué? Cuerpo vacío. Tengo Cors habilitado.

cuerpo vacío === segundo

imagen

 const handleSubmit = async (e) => { e.preventDefault() try { let data = new FormData() data.set("key", "") data.append("image", groupPFP.file) const res = await fetch("https://api.imgbb.com/1/upload", { method: "POST", body: data, }) const parseRes = await res.json() if (parseRes.status === 200) { const imgbbLink = parseRes.data.display_url const resData = { groupProfileImage: imgbbLink, groupName, groupAbout } const res = await fetch("http://localhost:5000/api/group/create", { method: "POST", headers: { "Content-Type": "application/json", JwtToken: localStorage.getItem("JwtToken"), }, body: JSON.stringify(resData), }) const parseResPFP = await res.json() if (parseResPFP.status === 429) { return toast.error("Too Many Requests, try again later") } toast.success("Group created successfully") } } catch (error) { console.error(error) } }

Sin errores

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