api - Correct HTTP Response when resource changed -


i'm implementing rest web api .net core. 1 of action have in web api updating location of specific user..

[httpput("{username:username}/{regionname:regionname}", name = "updateuser")]     public async task<iactionresult> updateuser([fromroute][required]string username, [fromroute][required]string regionname, [frombody][required]updateuserviewmodel user)     {           //..some code here     } 

i.e. when operation finished, location of resource changed, if request in beginning was:

request1: put "localhost:5000/controller/usernamehere/location1" , updated "location2"

after request1 ends, new location request2: put"localhost:5000/controller/usernamehere/location2" , location in request1 irrelevant.

my question : best practice response (status code, location) returned in case?

thanks!


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -