Home > Enterprise >  While POSTing to an .NET WebApi from an angular Project, Its throwing Internal server error. But the
While POSTing to an .NET WebApi from an angular Project, Its throwing Internal server error. But the

Time:11-19

I'm working on a project where I have a feature to book an appointment for a pet with a doctor. The POST endpoint receives data in this format

creating appointment DTO at WebApi

I'm sending the same object from the angular project also. Check below format.

sending DTO from angular

the endpoint works fine with swagger or postman. But when I integrate this api call to angular. I'm being shown this error.

error logged in console

Here is the Pay load.

Payload

I tried posting to an api like my other teammates have done their post calls who have done exactly like this.

my post request

I have also made the backend api exactly like they have done for their features. They are able to post to their links but i'm not able to :(

CodePudding user response:

Is the problem with only this endpoint or other too? Try calling other endpoint to verify the correctness of api hosting

  • Related