What HTTP client does the Android Webview use? - android-webview

I am trying to understand how the webview in Android works. I know that the default http client in Android is HttpUrlConnection which uses okhttp and okio.
But I did some tests and found that the chromium in the webview doesn't use them. My question is: Does webview rely on any client to do the http requests or it has its own implementation for making the http requests?

Related

Unable to get API call logs from specific application running on Android using Charles

I am facing problem in getting API call's data using charles for one particular application. I have already done proxy settings on my android and iPhone. I am able to see logs from all other apps running on my mobile except a particular app.
Could there be any limitation imposed by Android app?
This is not limitation caused by Android app, but more likely caused by Charles.
Charles is a proxy, but only proxy for HTTP(S). There are many app that communicate with server using non-HTTP protocol (raw socket for example). In such condition, Charles is not able to intercept the requests and responses.

Charles Web Proxy not showing Unity Web Requests

I am working on an app that used Unity.WWW to make HTTP web requests. When we used this class, I could see all requests through Charles Web Proxy. We, just upgraded to use UnityWebRequest and now we can't see any of the calls that use this class in Charles, even though we can see them using WireShark.
Is there a way to configure Charles to capture these or is this a bug with Unity or possibly with Charles?
Unity fixed this bug in version 5.4.4p2:
https://unity3d.com/unity/qa/patch-releases/5.4.4p2

How to connect chrome web extension with localhost server?

I have a google chrome web extension that needs to communicate with a Qt desktop application - but how?
There is chrome's native messaging, but as I want to support multiple browsers/OS, this would be too much effort because it is only for chrome.
Then there is this post that suggests setting up a local server. This is what I did, see below.
I have set up a server with Qt with QTcpServer that uses QTcpSocket's on 127.0.0.1 (localhost). But a web extension can not listen to sockets, only chrome apps can. There are 2 possible solutions on my mind:
As a workaround, I could perhaps write a small chrome app. The Qt application would talk to the chrome extension via the chrome app (chrome apps support sockets). But I think this method is clumsy and not quite elegant.
On the other hand, I have read about socket.io.
The idea is: The chrome extension talks via http requests with socket.io, and socket.io talks via sockets with my desktop app. Is this a possible solution?
What I also tried, is to directly connect to the local server with the following code. In my Qt server application, I see that there is a new connection. But I can not get a response at all (either my Qt code is wrong or it is because extensions can not listen to sockets?)
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://localhost:12345", true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
alert('This is the response from the server: '+ xhr.responseText );
}
as you already know extensions can not create direct connections:
Google Chrome Socket API in extensions
possible solution
maybe your QT application could serve a websocket and you should be able to communicate with that from Javascript:
http://www.html5rocks.com/en/tutorials/websockets/basics/
if you are unable to serve websockets from inside the QT application, another approach could be create a "bridge" a little script that could serve a websocket to your JavaScript and pass the messages from/to the QT application
you will find plenty of examples on websockets, the easy way to get into this could be creating a little server using node.js to play with it stackabuse.com/node-js-websocket-examples-with-socket-io/
oh! and do a search for "websocket same origin policy"
Example of an extension using websockets (that will be useful for debugging): chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en
hope this helps

Burp Suite doesn't intercept HTTPS calls from Advanced Rest Client

I'm using burp suite to intercept the calls that I do with the plugin Advanced Rest Client and with a sinatra application that is called by the Advanced Rest Client.
I've set it as proxy of my whole system, but still it intercepts only the calls by Chrome :(
Any idea?
The reason was that my requests were using OAuth and SSL, so they are not filtered by Burp Suite.

GWT RPC over HTTPS

I have a fairly large GWT application which I am serving over HTTP (So that the javascript can be cached). Is it possible (if so how?) to have the application served over HTTP but have the RPC calls go over HTTPS. I realize that I would get one of those nasty warnings that I am mixing HTTP and HTTPS but I can live with that.