In my application I have route /users/37/verify_email
. Because action for this route updates activation info in database I ask client to complete this request with PUT
method.
In application on backend there are many steps to verify. After success verification I redirect client to next step with 302 Found
with a little hack:
Location: /users/37/verify_email?_method=PUT
This looks ugly a bit for me.
Is this OK to do such redirections?
UPD
I follow the REST
and when I want to delete resource I generate next link on admin page:
<a href="/users/37?_method=DELETE">Delete</a>
<a href="/users/37" >View </a>
If we are in browser there will be:
GET /users/37?_method=DELETE
GET /users/37
When performing application/json
there will be:
DELETE /users/37
GET /users/37
But I am not sure is this OK to put such routes into Location
header:
Location: /users/37?_method=DELETE
I can not find anywhere this syntax:
Location: DELETE /users/37