Last active
July 16, 2020 17:16
-
-
Save tcarreira/67bb67d86131e790a8db71b952124c1f to your computer and use it in GitHub Desktop.
Save a POST request as a bookmark
This file contains 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
javascript:post('<site_url>',{param1:'value1',param2:'value2'});function post(a,b){const c=(e,f)=>Object.assign(document.createElement(e),f),d=c('form',{action:a,method:'post',hidden:true});for(const[e,f]of Object.entries(b))d.appendChild(c('input',{name:e,value:f}));document.body.appendChild(d),d.submit()} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment