Konda.eu

C# and AngularJS - Receive Post data

1 comment

C# and AngularJS - Receive Post data

AngularJS is awesome, C# also. But AngularJS has slightly unstandardized way of sending data over networks. Data is packet body instead of header, which may cause quite some problems  if you're unaware of this.

MVC Framework will automatically deserialize data into object when it receives, you only need to tell it that it should look for data in body instead of header.

[HttpPost]
public int method([FromBody]Model m)
{
        // ...

 

One comments on “C# and AngularJS - Receive Post data
  1. Anonymous on said:

    I am extremely inspired together with your writing
    skills and also with the format to your blog. Is that this a paid
    subject matter or did you modify it your self? Anyway keep up the nice high quality writing,
    it is rare to look a great blog like this one today..

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.