Ok, so I know how to send an HTTP POST request to a website in code, and I know how to open a URL in a browser (HTTP GET). But how to open HTTP POST in a browser.
EDIT: Details: On a website you can open a page to add a new entry, you can sow this page with information by POSTing this information. I have this information in my Java Desktop application, so from my Java application I want to open a new input page in my preferred user browser, seeded with known information.
EDIT: I tried Lees to answer and managed to create a webpage with a submit button, when you click on it, it goes to the final page with the fields filled in, but I can not get javascript to work so that it automatically goes there, without having to press the submit button . Here is the webpage I'm generating
<html><head>
<script type = "text/javascript">
function onLoad()
{
document.getElementById('form').submit();
}
</script>
</head>
<body>
<form name="form" action="http://test.musicbrainz.org/release/add" method="post">
<input name="name" type="hidden" value="Porcupine"/>
<input type="submit" value="send">
</form>
</body>
source
share