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

109
Views
$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
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!