I want to "fill in" a form on a website from java. I used charles proxy to determine that pressing the "Register" button on this form sends a URL encoded Http post request.

For example, if the website were:

https://apps.business.com/register

Then the http post was sent to:

https://apps.business.com/registersend

I then used the Advanced Rest Client plug-in for chrome to send a sample registration request successfully.

However, I now want to manually send this request from Java. I thought that as it was URL encoding, it would be a simple case of appending a URL encoded string to the rest of the URL. Something like:

https://apps.business.com/registersend/?email=me%40hotmail.com

etc., but I can't seem to get this to work and assume I'm missing something.

Thanks for the help.

没有正确的解决方案

其他提示

To send HTTP POST you will need something like the HTTP Client API.

http://hc.apache.org/httpclient-3.x/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top