Find Jobs
Hire Freelancers

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

£10-20 GBP

Cerrado
Publicado hace alrededor de 4 años

£10-20 GBP

Pagado a la entrega
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.
ID del proyecto: 24008775

Información sobre el proyecto

4 propuestas
Proyecto remoto
Activo hace 4 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
4 freelancers están ofertando un promedio de £11 GBP por este trabajo
Avatar del usuario
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 en 1 día
5,0 (7 comentarios)
3,9
3,9
Avatar del usuario
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 en 2 días
5,0 (1 comentario)
0,0
0,0
Avatar del usuario
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 en 1 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de GERMANY
Belfast, Germany
5,0
1
Forma de pago verificada
Miembro desde nov 11, 2019

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.