You can solve this more easily using a proxy tool like Charles.

This is the sort of thing usually not done from inside the app but to test 
the app.
Yes, there are apps whose main job is to handle HTTP, and they're the 
exception, 
but most apps want to rely on HTTP, not manage it. So as Kristopher 
indicated, it's 
a matter of what your use case is.

For most situations where I've seen a need for the data you requested, it's 
been 
proper to use an external tool to get at the HTTP innards.

-- 
Lew

On Monday, June 24, 2013 7:07:57 AM UTC-7, Kristopher Micinski wrote:
>
> Not as far as I know: there is no such mechanism through the API.  I 
> haven't checked what you can get access to if you use reflection, 
> though I also doubt you can do many tricks there either.  I don't know 
> much about WebKit internals, so I'm not sure if this is something that 
> would be possible. 
>
> However, maybe we could help if you better explain your use case.  Are 
> you trying to (e.g.,) make sure no bad AJAX code runs from a webpage 
> you loaded in your app? 
>
> Kris 
>
> On Mon, Jun 24, 2013 at 5:48 AM, jricha...@googlemail.com <javascript:> 
> <jricha...@gmail.com <javascript:>> wrote: 
> > is there a way to get request and response objects from a webview? 
> > 
> > for requests made from some webpage running in my webview, i want to 
> > intercept the full http request object(the headers, http method used, 
> http 
> > body etc) and divert and send across that request into another channel. 
> > 
> > For responses received from the webview, i want to do the same and get 
> the 
> > object and its properties. 
> > 
> > So far i have looked at the webviewClient android class which allows you 
> to 
> > intercept url links executed by a webpage and intercept the resources it 
> > loads. 
> > 
> > However, what i want to intercept, is any actual http requests the 
> webpage 
> > makes. is this possible in Android webview? 
> > 
> > thanks 
> > 
> > -- 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Android Developers" group. 
> > To post to this group, send email to 
> > android-d...@googlegroups.com<javascript:> 
> > To unsubscribe from this group, send email to 
> > android-developers+unsubscr...@googlegroups.com <javascript:> 
> > For more options, visit this group at 
> > http://groups.google.com/group/android-developers?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Android Developers" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to android-developers+unsubscr...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to