joukevandermaas / saule

JSON API library for ASP.Net Web API 2.
https://joukevandermaas.github.io/saule
MIT License
76 stars 37 forks source link

How does saule return 201 created? #122

Closed dhirajdhakal09 closed 8 years ago

dhirajdhakal09 commented 8 years ago

Hi,

On creating an entity with POST verb I would expect to get 201 created along with the newly created json response, but it is giving 200 OK instead.

The following is the definition:

    [HttpPost]
    [ReturnsResource(typeof(AddressResource))]
    [Route("api/address")]
    public CustomModel.Address Insert([FromBody] CustomModel.Address address)
    {
     }

Please help me asap.

joukevandermaas commented 8 years ago

You can use the regular ASP.Net way of doing this. Saule does not change that.

dhirajdhakal09 commented 8 years ago

Thanks jouke. :)