Last active
August 22, 2018 19:20
-
-
Save LucasIron/2f8a7891702b5a51624f0114637fdc15 to your computer and use it in GitHub Desktop.
fetch a form passing its input values as querystring parameters;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| form => fetch(form.getAttribute('action') + [].reduce.call(form.querySelectorAll('[name]'), (params, input) => params + encodeURI(input.getAttribute('name') + '=' + input.value + '&'), '?') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment