Greetings!

It is clear that the Android Browser app can be launched from any
other application, through an Intent as :

Intent intent = new Intent(Intent.ACTION_VIEW);
Uri data = Uri.parse("http://www.google.com";);
intent.setData(data);
startActivity(intent);

This would however internally perform a HTTP GET request.

I'm trying to explore to somehow launch Browser app, to perform a HTTP
POST, instead of a GET request.
I'm trying to load the key-value pairs in a Bundle and send across to
Browser (example below) :

Bundle extraHeaders = new Bundle();
extraHeaders.putString("user_name", "test");
extraHeaders.putString("user_pass", "test");
intent.putExtra(Browser.EXTRA_HEADERS, extraHeaders);

But these will be loaded as 'Http headers', but not as request
parameters. Moreover this attempt would still launch it as a HTTP GET
request.

Has anyone tried something similar ? The Browser app internally uses a
WebView, which offers APIs like
loadUrl () - for GET &
postUrl () - for POST.

Interestingly, I don't find Browser app calling 'postUrl()' anywhere
in its code..
Then how does it manage POST requests for websites launched through
it?

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

Reply via email to