ajax-form icon indicating copy to clipboard operation
ajax-form copied to clipboard

Allow for User Defined Redirect With Successful PUT/PATCH/DELETE

Open joelclipperton opened this issue 8 years ago • 0 comments

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.

joelclipperton avatar Dec 27 '16 13:12 joelclipperton