Skip to content

requestHandler and postNavigationHooks seem redundant #1633

Closed

Description

@matjaeck

Which package is the feature request for? If unsure which one to select, leave blank

@crawlee/browser (BrowserCrawler)

Feature

Providing requestHandler is required but IMO it is redundant with what postNavigationHooks are there for. The semantics are IMO also rather confusing, as the function does not handle network requests but rather navigation.

Replace requestHandler(ctx) with new navigationHandler(ctx, gotoOptions) and fix confusing request-handling semantic when navigation-handling is meant.

Thoughts? What can you do in a user defined requestHandler that you cannot do in user defined post navigation hooks?

Motivation

Fix #1631.
Reduce confusion.

Ideal solution or implementation, and any additional constraints

not sure, needs feedback

Alternative solutions or implementations

not sure, needs feedback

Other context

No response

Activity

  1. added
    featureIssues that represent new features or improvements to existing features.
    on Oct 26, 2022
  2. locked and limited conversation to collaborators on Oct 31, 2022
  3. converted this issue into a discussion #1640 on Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIssues that represent new features or improvements to existing features.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions