CDVURLProtocol - startLoading method not executed when ajax calls are triggered

546 Views Asked by At

I'm trying to catch outgoing ajax calls in order to change the request by adding client certificate to it.

It seems that it can be done by subclassing NSURLProtocol. In Phonegap there is already a subclass called CDVURLProtocol.

The canInitWithRequest method is called, however startLoading method in which the request changes can be implemented is not called.

Any ideas ?

Thanks in advance,

1

There are 1 best solutions below

0
On

According to UIWebViewDelegate not monitoring XMLHttpRequest?:

"UIWebViewDelegate does not monitor requests made by using a XMLHttpRequest"