ajax-form
ajax-form copied to clipboard
Allow for User Defined Redirect With Successful PUT/PATCH/DELETE
I am using ajax-form to submit a PUT requests to an adonisjs application. Upon submitting the PUT request to edit a record, my application redirects to list all entries. The problem, when using ajax-form, is the redirected URL takes on the same method selected in the form.
The initial PUT request is fullfilled, the app sends a redirect to a GET URL, but Instead of sending a GET request, it continues to send the PUT method along with the redirect request.
It would be nice to have an 'redirect' option to set a redirect location, when the initial request is successful.