ScrapeableFileEventFireTime

ScrapeableFileEventFireTime

Enum

  • BeforeScrapeableFile Before a scrapeable file is launched (inlcuding before any scripts on it run).
  • BeforeHttpRequest Fired right before the http request (after any "before scrapeable fie" scripts, and wil fire each time the request is retired). If it returns a non-null String, that will be used as the response instead of issuing a request. This response will still get passed into the AfterHttpRequest even, but it will not pass through any tidying.
  • AfterHttpRequest Fire right after the http response and running tidy, if set, but before anything else happens. Returns the data that should be used as the response data.
  • AfterScrapeableFile After a scrapeable file is completed (including afer any scripts on it run).
  • OnHttpRedirect* Called when a redirect will occur, and returns true if a redirect should occur or false if it should not (any non boolean results in no chanage).

*Note: When using the Async HTTP client you will have access to the request builder from ScrapeableFileEventData.getRedirectRequestBuilder() which can be used to modify and adjust the request before it is sent. If you use the Apache HTTP client the getRedirectRequestBuilder() method will always return null.

Change Log

Version Description
6.0.55a Introduced for pro and enterprise editions.

Examples

How to use the EventFireTime with the session.addEventcallback method.

    session.addEventCallback(ScrapeableFileEventFireTime.BeforeScrapeableFile, handler);