regex + adjustment parameters for modifying or rejecting resources being loaded by the webpage. Example:
special pattern matching regex. capture groups can replace parts of the
changeUrl that use the special marker tokens
$$1, etc on to
for example: if
changeCaptureRegex="^.*?/(.*)$" would create a match group for everything after the last
/ character and
changeUrl="http://example.com/$$1" would then get evaluated to
changes the current URL of the network request.
You can inject parts of the original URL into your changeUrl using one of the special marker tokens:
if true, blacklists the request unless a later matching resourceAdjustor changes it back to false (we process in a FIFO fashion) by default, we don't blacklist anything. You should keep it this way when rendering jpeg (where the visuals matter), if processing text/data, blacklisting .css files ['..css.'] will work fine. check the response.metrics for other resources you could blacklist (example: facebook, google analytics, ad networks)
set to override the method.
set to override the post body.
pattern used to match a resource's url.
examples: it really depends what the site is and what you are wanting to block, but for example to block anything with the text "facebook" or "linkedin" in the url:
It's especially useful if you just need the text, as you can block all css files from loading, such as:
Don't use this to block images. instead, images are blocked by using the IRequestSettings.ignoreImages=true property```
optional key/value pairs for adjusting the headers of this resource's request. example:
set the response to be returned to the requesting page. warning: setting this to an empty object will force a blank response. to skip this, do not set it, or set to null.
set the response body
sets the Content-Type response header
set response headers
set response status code.