• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

88
Vistas
PUT request from React through superagent being sent with no content

The method sending the request looks like this:

const updateCompany = ({sessionKey},company) => {
    const tempCompany = company.newCompany;
    console.log("sessionkey:" + sessionKey);
    console.log("check123" + JSON.stringify(tempCompany,getCircularReplacer()));
    const url = createServiceUrl(`api/company/${sessionKey}/${tempCompany.id}`);
    request
        .put(url)
        .send({ Company: tempCompany })
        .end((err, res) => {
            if (res.ok) {
                console.log("Updated OK!")
            }
        });
}

The check123 console.log prints the object I'm trying to send with all the expected values and keys, but for some unknown reason the request going out is completely empty and all I get back from the controller is a 204. I suppose I'm supposed to do something differently here, but I can't see what.

almost 3 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda