How to send a post request to website via java
Hi
I have some problems with post method in html web sites.
can you tel how to send a post request to website via java desktop application?
for example imagine a form like this :
<form id="frm-13355796114f9b53db8d171"method="post"
action="http://www.someexample.com/profile/login/authenticate/atrty/1335579611/avrvy//key/4991f7eb6719a9920d19baea68c7dfaa1d46a6d2/">
<input type="text" name="data[username]" id="username" value="" class="formText english" />
<input type="password" name="data[password]" id="password" value="" class="english" />
<input type="checkbox" name="data[invisible]" id="invisible" value="1" class="english" />
<input type="hidden" name="data[loginfrom]" value="" class="english" id="loginfrom" />
<input type="hidden" name="secfrdcodedvar" id="secfrdcodedvar" value="44b67c246d35897489956382c7a17979bdb467c5" />
<input type="submit" name="btnSubmit" id="btnSubmit" value="????" class="btn" />
<input type="hidden" name="frm-id" value="13355796114f9b53db8d171" id="frm-id" />
</form>
what is the java code to send a post request ?
Thanks
Re: How to send a post request to website via java
Re: How to send a post request to website via java
Moved from Advanced Java
db
Re: How to send a post request to website via java
Try the httpserver apache libraries... they are really powerful... I used them to login into my website from my program...
Re: How to send a post request to website via java
You can try Apache HttpComponents,URL:Apache HttpComponents,It will help you to simulate browser.Request Http server and get response data.