tags:

views:

335

answers:

1

Hi all,

I have to access a web page from within my application and, in order to have access to it, I need to set some custom HTTP headers. I want to use the WebViewclass in my activity but, as far as I can tell, it's not possible to set custom HTTP headers.

So is there a way of using the existing web browser (or WebView) with custom HTTP headers? My application targets Android 1.6.

Any idea how to solve this is greatly appreciated.

Thanks!

A: 

You would need to fetch the page yourself (e.g., via HttpClient) and load it into the WebView that way.

CommonsWare
Yeah, I am already doing that, however that page contains other links (absolute links). The problem then appears when accessing one of those links in the page, the server sends me back an error page as the headers are needed further. I suppose I would need to download manually all the pages on which the user taps then, if there's no other way. Ugly ...
Stelian Iancu
Someone please tell me there's a better way to do this! I'm in the same boat. Not to draw the (obvious) comparison, but on a certain other OS, this took a single line of code using the standard-issue objects. I'm still hopeful there might be some other kind of end-run around this ...
Joe D'Andrea