문제

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