Skip to content

[πŸš€ Feature]: [dotnet] [bidi] Revisit InterceptRequestAsync methodΒ #15592

@nvborisenko

Description

@nvborisenko

Description

This method in Network module is middle-ware: combining command + event subscription. And this plays very good role: prevent user to make mistake at runtime, moving the error at compilation level (interception without subscribing doesn't make sense).

Usage:

await using var intercept = await bidi.Network.InterceptRequestAsync(async e =>
{
    await e.Request.Request.FailAsync();
});

Since it is middleware method, we can do our best to:

await using var intercept = await bidi.Network.InterceptRequestAsync(async req =>
{
    await req.FailAsync();
});

Where intellisense will promote additional methods only when the request is intercepted.

Have you considered any alternatives or workarounds?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!I-enhancementSomething could be better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions