How do you force a web browser to use POST when getting a url?

前端 未结 11 2597
别跟我提以往
别跟我提以往 2020-12-14 00:16

How do you force a web browser to use POST when getting a url?

11条回答
  •  囚心锁ツ
    2020-12-14 00:39

    I have a feeling from your question you were just hoping to send a post request in a browser's address bar.

    Just type the following into the address bar swapping the value for 'action' to the url that you like.

    data:text/html,

    It's invalid html, but the browser's (at least all the ones i've tested it in so far) know what you mean, and I wanted to keep it as short as I could.

    If you want to post values, append as many inputs as you like, swapping name and value in each input for whatever you like.

    
    
    

    It's important to note that sensitive information you post will be visible in:

    • your history
    • your address bar
    • your browser's autocomplete.
    • possibly other sites that you visit from the same tab
    • probably plenty of other things too

    It's a really bad way to send a post request, and all the other answers are far better, but it's still cool that you can do it.

提交回复
热议问题