Results 1 to 5 of 5
- 04-28-2012, 08:38 PM #1
Member
- Join Date
- Apr 2012
- Posts
- 4
- Rep Power
- 0
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
- 04-28-2012, 08:54 PM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,608
- Rep Power
- 5
Re: How to send a post request to website via java
See Lesson: Working with URLs (The Java™ Tutorials > Custom Networking)
especially the 'writing to' a URLConnection section
- 04-28-2012, 10:23 PM #3
Re: How to send a post request to website via java
Moved from Advanced Java
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 05-07-2012, 12:52 AM #4
Member
- Join Date
- Apr 2012
- Posts
- 37
- Rep Power
- 0
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...
- 05-15-2012, 02:19 PM #5
Member
- Join Date
- May 2012
- Posts
- 4
- Rep Power
- 0
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.
Similar Threads
-
proxy ip send post request
By rojersjoo in forum NetworkingReplies: 4Last Post: 02-18-2012, 02:36 AM -
Authenticating for a java POST request
By stodds in forum Advanced JavaReplies: 1Last Post: 12-08-2010, 12:11 AM -
how to post data to a website using java
By mr_anderson in forum Advanced JavaReplies: 6Last Post: 11-12-2010, 11:46 AM -
HTTP Post Request from Java
By Darrarski in forum New To JavaReplies: 10Last Post: 06-05-2010, 05:22 PM -
How to post HTTPS request from java client to server
By Desai in forum NetworkingReplies: 1Last Post: 07-14-2007, 05:15 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks