Find Jobs
Hire Freelancers

Attempting to pass JSON body for deletion through angular JS -- 4

£10-20 GBP

Chiuso
Pubblicato circa 4 anni fa

£10-20 GBP

Pagato al completamento
Attempting to pass JSON body for deletion through angular JS I've currently got an endpoint that relies on a JSON body in order for deletion to happen. This is the following code: if ([login to view URL] > 0) { var deleteRequest = []; for (var i = 0; i < [login to view URL]; i++) { var service = {}; [login to view URL] = $[login to view URL][toDeleteService[i]].serviceId; [login to view URL](service); } var deleteUrl = "api/class/" + $scope.targetEntity.serviceId+ "/student"; await asyncDeleteUrl(deleteUrl, deleteRequest); } async function asyncDeleteUrl(deleteUrl, toBeDeleted) { return new Promise(function (resolve, reject) { $[login to view URL](deleteUrl, toBeDeleted) .then(function (response) { resolve(response); }, function (errorResponse) { reject(errorResponse); $[login to view URL]('Bad Modification Interrupted', errorResponse); }); }); } I keep getting an error saying the required rest body is missing but I'm not sure why that would be the case. Any help would be appreciated, thank you.
Rif. progetto: 24008775

Info sul progetto

4 proposte
Progetto a distanza
Attivo 4 anni fa

Hai voglia di guadagnare un po'?

I vantaggi delle offerte su Freelancer

Imposta il tuo budget e le scadenze
Fatti pagare per il lavoro svolto
Delinea la tua proposta
La registrazione e le offerte sui lavori sono gratuite
4 freelance hanno fatto un'offerta media di £11 GBP
Avatar dell'utente
I would like to help you right now, I am available right now, send me a message to continue greetings, I ALREADY HAVE THE MISTAKE.
£10 GBP in 1 giorno
5,0 (7 valutazioni)
3,9
3,9
Avatar dell'utente
Hi, I am full stack developer that has more than 8 years of experience. I have inspected your code, if this is all the code that you are using , it looks like you send "deleteRequest" parameter as an empty array to "asyncDeleteUrl" function. It may the reason of the error
£10 GBP in 2 giorni
5,0 (1 valutazione)
0,0
0,0
Avatar dell'utente
I think what your are trying to do is push the service object that you created inside the loop in the delete request, because with the current code that you are using the deleteRequest array is empty.
£10 GBP in 1 giorno
0,0 (0 valutazioni)
0,0
0,0

Info sul cliente

Bandiera: GERMANY
Belfast, Germany
5,0
1
Metodo di pagamento verificato
Membro dal nov 11, 2019

Verifica del cliente

Grazie! Ti abbiamo inviato tramite email il link per richiedere il tuo bonus gratuito.
Non è stato possibile inviarti l'email. Riprova per piacere.
di utenti registrati di lavori pubblicati
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Caricamento anteprima
Autorizzazione per la geolocalizzazione concessa.
La tua sessione è scaduta ed è stato effettuato il log out. Accedi nuovamente per piacere.