hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Villemos, Gert" <gert.ville...@logica.com>
Subject Submitting POST with x-www-form-encoded
Date Tue, 19 Jul 2011 21:59:50 GMT
I need to POST to a login form with the specification


<form name="loginForm" METHOD="post" ACTION="/arsys/servlet/LoginServlet" enctype="x-www-form-encoded">


For this I have to questions

1. I dont understand how the form action is specified. Is it specified (like the commons httpclient)
as a NameValuePair such as 

   List<NameValuePair> formparams = new ArrayList<NameValuePair>();
   formparams.add(new BasicNameValuePair("action", "loginForm"));



2. How can I encode as x-www-form-encoded''? I have tried

  entity = new UrlEncodedFormEntity(formparams, "x-www-form-encoded");

But get an exception.


Think green - keep it on the screen.

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any other party. If you are not
an intended recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message