Possible to Monkey Punch/Duck Punch Ti.Network.createHTTPClient?

You must Login before you can answer or comment on any questions.

Does anyone know if it's possible or even if there are any examples of monkey patching/duck punching the Ti.Network.createHTTPClient method? I wanna do a simple modification of this method so I can pass a data fixture (object literal) to the onload callback function during development. I made a few attempts to make this happen to no avail; I got a lot of cryptic titanium error messages. Any help or suggestions are greatly appreciated!

1 Answer

You can achieve this by wrapping the proxy of the Network object.

Have a look at this article from the Titanium Developer Blog. there is a section on Wrapping Proxies.

Your Answer

Think you can help? Login to answer this question!