java - How to submit text via forms using JSoup -



java - How to submit text via forms using JSoup -

i'd submit text form using jsoup. how go doing this?

<form id="quickpostform" action="" method="post" style="display: block; text-align: center; "> <input type="hidden" name="action" value="reply"/> <input type="hidden" name="auth" value="54a9871a63a1c285879a5327faf3d8d2"/> <input type="hidden" name="thread" value="135454"/> <div id="quickreplytext"> <textarea id="quickpost" style="width: 95%; " tabindex="1" onkeyup="resize('quickpost');" name="body" cols="90" rows="8"/> <br/> </div>

take @ jsoup.connect method , connection interface.

once have text want submit ready go, can post url form submission.

e.g.:

document doc = jsoup.connect(url) .data("action", "reply") .data("auth", "54a9871a63a1c285879a5327faf3d8d2") .data("thread", "135454") .data("quickreplytext", replytext) .post();

the returned doc object result page of post.

java android webview jsoup

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -