How to change the redirect request from put to get

Hi, guys. I have a PUT request from HTTP. I want redirect to a new page for web.
I try put_status(303), but it reload current page for web.

As shown above, I get error that no route found for PUT /children (MbbWeb.Router).
So, how can change request method to “GET”.
Can do?
If can’t, why?
My http knowledge is poor.

Error info as following:

conn.method is “PUT”

This is not normal browser behavior. I noticed you are sending a json response - is this an Ajax (javascript) request? If so you can’t use a server-side redirect to change the page the browser is on. You could send a response that tells your script to perform a redirect, and then change the path in javascript by setting window.location.href.


Thanks, this controller be able to receive “Form submit” or “Ajax”.:smiley:
i think the reason is differection about “Form submit” and “Ajax”.
I need to learn more about it.:pensive: