Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

112
Vistas
$http POST array params sent incorrectly in payload : Angular JS

i am assigning an array to a key which need to be send in the payload of POST call in my angular js application. for example like below.

this.selectedCtlIds =[877, 982, 091, 112];

function saveFormSettings() {
 let data = this.settings; // have various key from the GET call
 data.statusIdToBeChanged = this.selectedCtlIds;
 console.log(data.statusIdToBeChanged, 'test '); // works fine

 Service.updateSettings(data).then(function (resp) {
  //POST CALL HERE
}

}


function updateSettings(param) {
    return $http({
        method: 'POST',
        url: url + '/setting',
        params: param
    })
}

expected payload by api is like statusIdToBeChanged: [877, 982, 091, 112]

instead it is passed like below when i checked in network payload

statusIdToBeChanged[]: 284
statusIdToBeChanged[]: 982
statusIdToBeChanged[]: 091
statusIdToBeChanged[]: 112

due to which the api is failing. i am not sure why it is like this in payload.

about 4 years ago · Santiago Gelvez
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 Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda