ariya/phantomjs — pull request #407 by Vitallium (2013-02-17 21:24:08+00:00)
Title: Reworked api for cancel network requests.

Added experimental API for change the url of the network request.

**Issue:**
http://code.google.com/p/phantomjs/issues/detail?id=539

**General**
This commit brings back 2 signals for `resourceReceived` event:
- at the beginning
- and at the end

(like it was before)

Also, it brings new API for operating on the request's url in `resourceRequested` event.
*Example:*
````
page.onResourceRequested = function(requestData, request) {
if (requestData['url'] == urlToChange) {
request.setUrl(fakeUrl);
}
};
````