Angular http put request does not work and gives me an error 500

861 views Asked by At

I built a Website using Angular and it works so far. I can get data from a localhost running, but I can't put any data on it. It always gives me the error 500 (picture might help). See Error message

My put request looks like this:

public setParkingEntries(x: any) {
return this.http.put(this.configUrl + "/api/tickets/SaveTicket", x); } 

And

this.parkingService.setParkingEntries(this.dataX).subscribe (data =>  { })

Now, this.dataX is an Object Array containing all Data I want to upload to the server. Note that the first code is in my parking.service.ts file and the second code is in my parking.component.ts file.

Can anyone tell me how to either fix this or at least tell me what the issue might be?

Thanks for any replies in advance.

0

There are 0 answers