WebView webView = ....;
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("parameter1", "someValue"));
parameters.add(new BasicNameValuePair("id", "12345"));
parameters.add(new BasicNameValuePair("encodingTest", "&\";"));
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(parameters);
webView.postUrl("http://some.host.com/path";,
EntityUtils.toByteArray(entity));

If you need a specific encoding on your posted data you supply that in
the alternative ctor of UrlEncodedFormEntity.

On 13 Juni, 13:41, Shashidhar <shashi.zep...@gmail.com> wrote:
> Hi,
>  I need to open a browser with a URL when I click on a button in my
> activity.
> The URL has some parameters which I need to send it using HTTP POST method.
> I am able to get it working with the GET request where we append the
> parameters to the end of the URL.
> But, I need the POST method way.
> Any Ideas on how to send the URL data using POST method to open it in
> browser.
>
> Thanks,
> Shashidhar

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to