I am using NancyFX to host our REST APIs for Web site. We have user table in database, which I would like to update for:
1) Full user update - updates all fields 2) Partial user update - updates only single field
We are using Nancy 0.7 - so currently it does not have PATCH support - I can only use PUT
I have defined my API like
PUT ["/user/{username}"] - for complete update using passed-in user object value
PUT ["/user/{username}/id/{newid}"] - for updating user id only
However, when I call the second API (to update id only) - it never gets trapped by Nancy - and Nancy always call the method to fully update user i.e. PUT ["/user/{username}"]
No matter, what order I declare the APIs, Nancy always call the full user update endpoint only.
Need help, so that I can use both APIs using PUT from our client applications properly.