Open dmytronasyrov opened 7 years ago
Solved
Plug.Conn.put_status(conn, 303)
Note: RFC 1945 and RFC 2068 specify that the client is not allowed to change the method on the redirected request. However, most existing user agent implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original request method. The status codes 303 and 307 have been added for servers that wish to make unambiguously clear which kind of reaction is expected of the client.
I have set a custom delete action for one of models. Same as in this article: article But instead of index GET redirection it sends DELETE. Any idea how to explicitly set GET verb to
redirect to
? I have tried to explicitly set GET into conn, so conn doesn't have any "delete" inside:Result is the same without any changes into conn, just with redirect. But redirect is still going into DELETE (without :id parameter)